Clear all old flags, even if we change the gc mode during the major gc.

This commit is contained in:
Narihiro Nakamura
2013-01-17 10:11:33 +09:00
parent 4728070ec5
commit 7841a0cac5
+2 -7
View File
@@ -1143,13 +1143,8 @@ static void
change_gen_gc_mode(mrb_state *mrb, mrb_int enable)
{
if (is_generational(mrb) && !enable) {
if (is_major_gc(mrb)) {
advance_phase(mrb, GC_STATE_NONE);
}
else {
clear_all_old(mrb);
gc_assert(mrb->gc_state == GC_STATE_NONE);
}
clear_all_old(mrb);
gc_assert(mrb->gc_state == GC_STATE_NONE);
mrb->gc_full = FALSE;
}
else if (!is_generational(mrb) && enable) {