diff options
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index a4bc276f04..5e1cfccf3c 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1433,13 +1433,9 @@ rb_vm_search_method_slowpath(struct rb_call_data *cd, VALUE klass) } static void -vm_search_method(struct rb_call_data *cd, VALUE recv) +vm_search_method_fastpath(struct rb_call_data *cd, VALUE klass) { struct rb_call_cache *cc = &cd->cc; - VALUE klass = CLASS_OF(recv); - - VM_ASSERT(klass != Qfalse); - VM_ASSERT(RBASIC_CLASS(klass) == 0 || rb_obj_is_kind_of(klass, rb_cClass)); #if OPT_INLINE_METHOD_CACHE if (LIKELY(RB_DEBUG_COUNTER_INC_UNLESS(mc_global_state_miss, @@ -1456,6 +1452,16 @@ vm_search_method(struct rb_call_data *cd, VALUE recv) rb_vm_search_method_slowpath(cd, klass); } +static void +vm_search_method(struct rb_call_data *cd, VALUE recv) +{ + VALUE klass = CLASS_OF(recv); + + VM_ASSERT(klass != Qfalse); + VM_ASSERT(RBASIC_CLASS(klass) == 0 || rb_obj_is_kind_of(klass, rb_cClass)); + vm_search_method_fastpath(cd, klass); +} + static inline int check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)()) { |