summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-01-06 13:06:25 +0900
committerNARUSE, Yui <naruse@airemix.jp>2021-03-11 20:36:52 +0900
commit6305d1c6edeec2c3aa25b9220142274f1ef2e868 (patch)
treeb6dd8a300e09b2a3fb67d09ac54a4b78d8ee37fe /iseq.c
parentd3863cb2e80f27d26b521b2c957b21feacb900de (diff)
remove invalidated cc
if cc is invalidated, cc should be released from iseq.
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/iseq.c b/iseq.c
index 096d456f11..2d83bc3f06 100644
--- a/iseq.c
+++ b/iseq.c
@@ -359,8 +359,12 @@ rb_iseq_mark(const rb_iseq_t *iseq)
rb_gc_mark_movable((VALUE)ci);
}
if (cc && vm_cc_markable(cc)) {
- rb_gc_mark_movable((VALUE)cc);
- // TODO: check enable
+ if (!vm_cc_invalidated_p(cc)) {
+ rb_gc_mark_movable((VALUE)cc);
+ }
+ else {
+ cds[i].cc = rb_vm_empty_cc();
+ }
}
}
}