diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-07-21 15:55:51 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-07-22 14:56:03 +0900 |
| commit | 670622f45dae813e6e80759b9389309abf98ec8a (patch) | |
| tree | 34b399a60c4e750c5b9f99fd57fdbf24fadd2816 | |
| parent | 6334949ba69363cb909a57d6871895bd6d98bb6b (diff) | |
| download | mruby-670622f45dae813e6e80759b9389309abf98ec8a.tar.gz mruby-670622f45dae813e6e80759b9389309abf98ec8a.zip | |
Skip unnecessary `mark_context` if `mrb->c == mrb->root_c`.
| -rw-r--r-- | src/gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |
