Fix -pic command line switch, and enable PICs in user-space

db4
Slava Pestov 2009-04-28 18:06:10 -05:00
parent 5b53562c7b
commit dfcbd206b6
3 changed files with 11 additions and 4 deletions

View File

@ -245,6 +245,12 @@ M: f compile-engine ;
generic-word get "methods" word-prop
assoc-size 2 * next-power-of-2 f <array> ;
: define-cold-call ( word -- )
#! Direct calls to the generic word (not tail calls or indirect calls)
#! will jump to the inline cache entry point instead of the megamorphic
#! dispatch entry point.
dup [ f inline-cache-miss ] curry [ ] like >>direct-entry-def drop ;
M: single-combination perform-combination
[
dup build-decision-tree
@ -256,5 +262,6 @@ M: single-combination perform-combination
make-empty-cache ,
[ lookup-method (execute) ] %
] [ ] make define
] 2bi
]
[ drop define-cold-call ] 2tri
] with-combination ;

View File

@ -26,6 +26,8 @@ void default_parameters(F_PARAMETERS *p)
p->tenured_size = 4 * CELLS;
#endif
p->max_pic_size = 3;
p->secure_gc = false;
p->fep = false;
@ -100,8 +102,6 @@ void init_factor(F_PARAMETERS *p)
p->tenured_size <<= 20;
p->code_size <<= 20;
p->max_pic_size = 3;
/* Disable GC during init as a sanity check */
gc_off = true;

View File

@ -61,7 +61,7 @@ typedef enum {
JIT_EXECUTE_CALL,
/* Used by polymorphic inline cache generation in inline_cache.c */
PIC_TAG = 53,
PIC_TAG = 48,
PIC_HI_TAG,
PIC_TUPLE,
PIC_HI_TAG_TUPLE,