From c171984ee39bc00f4e4d46799217f38fd8d6d3a0 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sat, 11 Apr 2020 19:00:08 -0700 Subject: [PATCH] Enable fastpath on invokesuper --- vm_insnhelper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 2fca2bdd9d..f24c756a86 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3222,7 +3222,8 @@ vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *c const struct rb_callcache *cc = vm_cc_new(klass, cme, vm_call_super_method); RB_OBJ_WRITE(reg_cfp->iseq, &cd->cc, cc); } - else { + else if (cached_cme->def->type == VM_METHOD_TYPE_REFINED) { + // vm_call_refined checks cc->call vm_cc_call_set(cd->cc, vm_call_super_method); } }