summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/vm_method.c b/vm_method.c
index dd00e524eb..0064488db7 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -1196,11 +1196,10 @@ rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
}
static const rb_callable_method_entry_t *
-callable_method_entry_refeinements(VALUE klass, ID id, VALUE *defined_class_ptr, bool with_refinements)
+callable_method_entry_refeinements0(VALUE klass, ID id, VALUE *defined_class_ptr, bool with_refinements,
+ const rb_callable_method_entry_t *cme)
{
- const rb_callable_method_entry_t *cme = callable_method_entry(klass, id, defined_class_ptr);
-
- if (cme == NULL || cme->def->type != VM_METHOD_TYPE_REFINED) {
+ if (cme == NULL || LIKELY(cme->def->type != VM_METHOD_TYPE_REFINED)) {
return cme;
}
else {
@@ -1210,6 +1209,13 @@ callable_method_entry_refeinements(VALUE klass, ID id, VALUE *defined_class_ptr,
}
}
+static const rb_callable_method_entry_t *
+callable_method_entry_refeinements(VALUE klass, ID id, VALUE *defined_class_ptr, bool with_refinements)
+{
+ const rb_callable_method_entry_t *cme = callable_method_entry(klass, id, defined_class_ptr);
+ return callable_method_entry_refeinements0(klass, id, defined_class_ptr, with_refinements, cme);
+}
+
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t *
rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class_ptr)
{