summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-11-16 18:18:45 +0900
committerKoichi Sasada <ko1@atdot.net>2021-11-17 22:21:42 +0900
commitb95d7d2099e0d9df68c08f23991ba35db6126bf5 (patch)
tree0c550bce41a435bd6db9ad6ee29a83aeeec16a3a /vm_insnhelper.c
parent7ec1fc37f4c87c691555e76d51b6590761b3ec64 (diff)
no need to check `cme == NULL`
Now `cc->cme_` is not NULL.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5122
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c3
1 files changed, 1 insertions, 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