Don't JIT inside heap scan loop, too fragile
parent
8fde3fb914
commit
7cd21081af
|
@ -730,7 +730,6 @@ void garbage_collection(CELL gen,
|
||||||
|
|
||||||
/* collect objects referenced from stacks and environment */
|
/* collect objects referenced from stacks and environment */
|
||||||
collect_roots();
|
collect_roots();
|
||||||
|
|
||||||
/* collect objects referenced from older generations */
|
/* collect objects referenced from older generations */
|
||||||
collect_cards();
|
collect_cards();
|
||||||
|
|
||||||
|
|
24
vm/factor.c
24
vm/factor.c
|
@ -36,22 +36,36 @@ void do_stage1_init(void)
|
||||||
fprintf(stderr,"*** Stage 2 early init... ");
|
fprintf(stderr,"*** Stage 2 early init... ");
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
|
|
||||||
|
GROWABLE_ARRAY(words);
|
||||||
|
|
||||||
begin_scan();
|
begin_scan();
|
||||||
|
|
||||||
CELL obj;
|
CELL obj;
|
||||||
while((obj = next_object()) != F)
|
while((obj = next_object()) != F)
|
||||||
{
|
{
|
||||||
if(type_of(obj) == WORD_TYPE)
|
if(type_of(obj) == WORD_TYPE)
|
||||||
{
|
GROWABLE_ADD(words,obj);
|
||||||
F_WORD *word = untag_object(obj);
|
|
||||||
default_word_code(word,false);
|
|
||||||
update_word_xt(word);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* End heap scan */
|
/* End heap scan */
|
||||||
gc_off = false;
|
gc_off = false;
|
||||||
|
|
||||||
|
GROWABLE_TRIM(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);
|
iterate_code_heap(relocate_code_block);
|
||||||
|
|
||||||
userenv[STAGE2_ENV] = T;
|
userenv[STAGE2_ENV] = T;
|
||||||
|
|
3
vm/run.c
3
vm/run.c
|
@ -22,8 +22,11 @@ void fix_stacks(void)
|
||||||
be stored in registers, so callbacks must save and restore the correct values */
|
be stored in registers, so callbacks must save and restore the correct values */
|
||||||
void save_stacks(void)
|
void save_stacks(void)
|
||||||
{
|
{
|
||||||
|
if(stack_chain)
|
||||||
|
{
|
||||||
stack_chain->datastack = ds;
|
stack_chain->datastack = ds;
|
||||||
stack_chain->retainstack = rs;
|
stack_chain->retainstack = rs;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called on entry into a compiled callback */
|
/* called on entry into a compiled callback */
|
||||||
|
|
Loading…
Reference in New Issue