Fix quotation pooling
parent
e8027742cf
commit
833d9f9c0b
|
@ -394,11 +394,11 @@ SYMBOL: deploy-vocab
|
||||||
deploy-vocab get vocab-main set-boot-quot*
|
deploy-vocab get vocab-main set-boot-quot*
|
||||||
stripped-word-props
|
stripped-word-props
|
||||||
stripped-globals strip-globals
|
stripped-globals strip-globals
|
||||||
strip-words
|
|
||||||
compress-byte-arrays
|
compress-byte-arrays
|
||||||
compress-quotations
|
compress-quotations
|
||||||
compress-strings
|
compress-strings
|
||||||
compress-wrappers ;
|
compress-wrappers
|
||||||
|
strip-words ;
|
||||||
|
|
||||||
: (deploy) ( final-image vocab config -- )
|
: (deploy) ( final-image vocab config -- )
|
||||||
#! Does the actual work of a deployment in the slave
|
#! Does the actual work of a deployment in the slave
|
||||||
|
|
|
@ -985,7 +985,8 @@ void primitive_become(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
gc();
|
gc();
|
||||||
iterate_code_heap(relocate_code_block);
|
|
||||||
|
compile_all_words();
|
||||||
}
|
}
|
||||||
|
|
||||||
CELL find_all_words(void)
|
CELL find_all_words(void)
|
||||||
|
|
20
vm/factor.c
20
vm/factor.c
|
@ -44,25 +44,7 @@ void do_stage1_init(void)
|
||||||
print_string("*** Stage 2 early init... ");
|
print_string("*** Stage 2 early init... ");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
CELL words = find_all_words();
|
compile_all_words();
|
||||||
|
|
||||||
REGISTER_ROOT(words);
|
|
||||||
|
|
||||||
CELL i;
|
|
||||||
CELL length = array_capacity(untag_object(words));
|
|
||||||
for(i = 0; i < length; i++)
|
|
||||||
{
|
|
||||||
F_WORD *word = untag_word(array_nth(untag_array(words),i));
|
|
||||||
REGISTER_UNTAGGED(word);
|
|
||||||
default_word_code(word,false);
|
|
||||||
UNREGISTER_UNTAGGED(word);
|
|
||||||
update_word_xt(word);
|
|
||||||
}
|
|
||||||
|
|
||||||
UNREGISTER_ROOT(words);
|
|
||||||
|
|
||||||
iterate_code_heap(relocate_code_block);
|
|
||||||
|
|
||||||
userenv[STAGE2_ENV] = T;
|
userenv[STAGE2_ENV] = T;
|
||||||
|
|
||||||
print_string("done\n");
|
print_string("done\n");
|
||||||
|
|
|
@ -522,3 +522,26 @@ void primitive_quotation_xt(void)
|
||||||
F_QUOTATION *quot = untag_quotation(dpeek());
|
F_QUOTATION *quot = untag_quotation(dpeek());
|
||||||
drepl(allot_cell((CELL)quot->xt));
|
drepl(allot_cell((CELL)quot->xt));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void compile_all_words(void)
|
||||||
|
{
|
||||||
|
CELL words = find_all_words();
|
||||||
|
|
||||||
|
REGISTER_ROOT(words);
|
||||||
|
|
||||||
|
CELL i;
|
||||||
|
CELL length = array_capacity(untag_object(words));
|
||||||
|
for(i = 0; i < length; i++)
|
||||||
|
{
|
||||||
|
F_WORD *word = untag_word(array_nth(untag_array(words),i));
|
||||||
|
REGISTER_UNTAGGED(word);
|
||||||
|
if(word->compiledp == F)
|
||||||
|
default_word_code(word,false);
|
||||||
|
UNREGISTER_UNTAGGED(word);
|
||||||
|
update_word_xt(word);
|
||||||
|
}
|
||||||
|
|
||||||
|
UNREGISTER_ROOT(words);
|
||||||
|
|
||||||
|
iterate_code_heap(relocate_code_block);
|
||||||
|
}
|
||||||
|
|
|
@ -5,3 +5,4 @@ F_FIXNUM quot_code_offset_to_scan(CELL quot, F_FIXNUM offset);
|
||||||
void primitive_array_to_quotation(void);
|
void primitive_array_to_quotation(void);
|
||||||
void primitive_quotation_xt(void);
|
void primitive_quotation_xt(void);
|
||||||
void primitive_jit_compile(void);
|
void primitive_jit_compile(void);
|
||||||
|
void compile_all_words(void);
|
||||||
|
|
Loading…
Reference in New Issue