From b95d7d2099e0d9df68c08f23991ba35db6126bf5 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Tue, 16 Nov 2021 18:18:45 +0900 Subject: no need to check `cme == NULL` Now `cc->cme_` is not NULL. --- vm_insnhelper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index ff02f14141..06a92013bd 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1949,8 +1949,7 @@ vm_search_method_fastpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass) #if OPT_INLINE_METHOD_CACHE if (LIKELY(vm_cc_class_check(cc, klass))) { - const struct rb_callable_method_entry_struct *cme = vm_cc_cme(cc); - if (LIKELY(cme && !METHOD_ENTRY_INVALIDATED(cme))) { + if (LIKELY(!METHOD_ENTRY_INVALIDATED(vm_cc_cme(cc)))) { VM_ASSERT(callable_method_entry_p(vm_cc_cme(cc))); RB_DEBUG_COUNTER_INC(mc_inline_hit); VM_ASSERT(vm_cc_cme(cc) == NULL || // not found -- cgit v1.2.1