Commit 24c57255 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #745 from authorNari/clear-old-flag-to-change-gc-mode

Clear all old flags, even if we change the gc mode during the major gc.
parents 4728070e 7841a0ca
...@@ -1143,13 +1143,8 @@ static void ...@@ -1143,13 +1143,8 @@ static void
change_gen_gc_mode(mrb_state *mrb, mrb_int enable) change_gen_gc_mode(mrb_state *mrb, mrb_int enable)
{ {
if (is_generational(mrb) && !enable) { if (is_generational(mrb) && !enable) {
if (is_major_gc(mrb)) { clear_all_old(mrb);
advance_phase(mrb, GC_STATE_NONE); gc_assert(mrb->gc_state == GC_STATE_NONE);
}
else {
clear_all_old(mrb);
gc_assert(mrb->gc_state == GC_STATE_NONE);
}
mrb->gc_full = FALSE; mrb->gc_full = FALSE;
} }
else if (!is_generational(mrb) && enable) { else if (!is_generational(mrb) && enable) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment