Skip to content

Commit

Permalink
no need to check cme == NULL
Browse files Browse the repository at this point in the history
Now `cc->cme_` is not NULL.
  • Loading branch information
ko1 committed Nov 17, 2021
1 parent 7ec1fc3 commit b95d7d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vm_insnhelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b95d7d2

Please sign in to comment.