Skip unnecessary mark_context if mrb->c == mrb->root_c.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-07-21 15:55:51 +09:00
parent 6334949ba6
commit 670622f45d
+3 -1
View File
@@ -1076,7 +1076,9 @@ final_marking_phase(mrb_state *mrb, mrb_gc *gc)
}
mrb_gc_mark_gv(mrb);
mark_context(mrb, mrb->c);
mark_context(mrb, mrb->root_c);
if (mrb->c != mrb->root_c) {
mark_context(mrb, mrb->root_c);
}
mrb_gc_mark(mrb, (struct RBasic*)mrb->exc);
gc_mark_gray_list(mrb, gc);
mrb_assert(gc->gray_list == NULL);