diff options
author | Koichi Sasada <ko1@atdot.net> | 2023-07-31 12:26:27 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2023-07-31 14:04:31 +0900 |
commit | 36023d5cb751d62fca0c27901c07527b20170f4d (patch) | |
tree | e042a12b89f942eb5b4424d04c80a1795fa79a7f /vm_insnhelper.c | |
parent | 60ac719acc3e4eccab770ebdd959dffcb702f2f2 (diff) | |
download | ruby-36023d5cb751d62fca0c27901c07527b20170f4d.tar.gz |
mark `cc->cme_` if it is for `super`
`vm_search_super_method()` makes orphan CCs (they are not connected
from ccs) and `cc->cme_` can be collected before without marking.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index d4474e7475..22373fb82f 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2096,7 +2096,7 @@ vm_search_cc(const VALUE klass, const struct rb_callinfo * const ci) cme = check_overloaded_cme(cme, ci); - const struct rb_callcache *cc = vm_cc_new(klass, cme, vm_call_general); + const struct rb_callcache *cc = vm_cc_new(klass, cme, vm_call_general, cc_type_normal); vm_ccs_push(klass, ccs, ci, cc); VM_ASSERT(vm_cc_cme(cc) != NULL); @@ -4630,7 +4630,7 @@ vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *c if (!klass) { /* bound instance method of module */ - cc = vm_cc_new(klass, NULL, vm_call_method_missing); + cc = vm_cc_new(klass, NULL, vm_call_method_missing, cc_type_super); RB_OBJ_WRITE(reg_cfp->iseq, &cd->cc, cc); } else { @@ -4645,7 +4645,7 @@ vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *c else if (cached_cme->called_id != mid) { const rb_callable_method_entry_t *cme = rb_callable_method_entry(klass, mid); if (cme) { - cc = vm_cc_new(klass, cme, vm_call_super_method); + cc = vm_cc_new(klass, cme, vm_call_super_method, cc_type_super); RB_OBJ_WRITE(reg_cfp->iseq, &cd->cc, cc); } else { |