diff options
author | Koichi Sasada <[email protected]> | 2021-01-06 13:06:25 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2021-01-06 14:57:48 +0900 |
commit | 954d6c743219c11c84dd107d059001752f186a27 (patch) | |
tree | 7766aa98d0b7cafebe5a8dbf379de0843c47e8b8 /iseq.c | |
parent | 442bd0e92cb8ca8e54f8121fc33adeb6b2b53e73 (diff) |
remove invalidated cc
if cc is invalidated, cc should be released from iseq.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4030
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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(); + } } } } |