summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-12 07:00:12 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-12 07:00:12 +0000
commitafdfbde4e73135985a3762adc437c6e317b0904e (patch)
treeafe03ca2839d53bedcd03f4fc86b272f493a2d3a /vm_insnhelper.c
parent6483a1057abdacff541641d117c364591bfb3e13 (diff)
* vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),
vm_insnhelper.c (vm_search_method): revert r37616 because it's too slow. [ruby-dev:46477] * test/ruby/test_refinement.rb (test_inline_method_cache): skip the test until the bug is fixed efficiently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index cf64c14684..554aad47b1 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -843,30 +843,19 @@ static void
vm_search_method(rb_call_info_t *ci, VALUE recv)
{
VALUE klass = CLASS_OF(recv);
- NODE *cref = rb_vm_cref();
- VALUE refinements = Qnil;
-
- if (cref && !NIL_P(cref->nd_refinements)) {
- refinements = cref->nd_refinements;
- }
#if OPT_INLINE_METHOD_CACHE
- if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && klass == ci->klass &&
- refinements == ci->refinements)) {
+ if (LIKELY(GET_VM_STATE_VERSION() == ci->vmstat && klass == ci->klass)) {
/* cache hit! */
}
else {
- ci->me = rb_method_entry_get_with_refinements(refinements, klass,
- ci->mid,
- &ci->defined_class);
+ ci->me = rb_method_entry(klass, ci->mid, &ci->defined_class);
ci->klass = klass;
- ci->refinements = refinements;
ci->vmstat = GET_VM_STATE_VERSION();
ci->call = vm_call_general;
}
#else
- ci->me = rb_method_entry_get_with_refinements(refinements, klass, ci->mid,
- &ci->defined_class);
+ ci->me = rb_method_entry(klass, ci->mid, &ci->defined_class);
ci->call = vm_call_general;
ci->klass = klass;
#endif