gc must mark macros as well

This commit is contained in:
Yuichi Nishiwaki 2013-11-01 18:55:44 +09:00
parent 8007baf011
commit 77b6b94e74
1 changed files with 5 additions and 0 deletions

View File

@ -239,6 +239,11 @@ gc_mark_phase(pic_state *pic)
gc_mark(pic, pic->globals[i]); gc_mark(pic, pic->globals[i]);
} }
/* macros */
for (i = 0; i < pic->mlen; ++i) {
gc_mark_object(pic, (struct pic_object *)pic->macros[i]);
}
/* pool */ /* pool */
for (i = 0; i < pic->plen; ++i) { for (i = 0; i < pic->plen; ++i) {
gc_mark(pic, pic->pool[i]); gc_mark(pic, pic->pool[i]);