[前][次][番号順一覧][スレッド一覧]

ruby-changes:25570

From: shugo <ko1@a...>
Date: Mon, 12 Nov 2012 16:00:27 +0900 (JST)
Subject: [ruby-changes:25570] shugo:r37627 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo),

shugo	2012-11-12 16:00:12 +0900 (Mon, 12 Nov 2012)

  New Revision: 37627

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37627

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/test/ruby/test_refinement.rb
    trunk/vm_core.h
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37626)
+++ ChangeLog	(revision 37627)
@@ -1,3 +1,12 @@
+Mon Nov 12 15:59:38 2012  Shugo Maeda  <shugo@r...>
+
+	* 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.
+
 Mon Nov 12 14:28:01 2012  NAKAMURA Usaku  <usa@r...>
 
 	* win32/mkexports.rb (each_export): skip garbages generated by VS2012's
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 37626)
+++ vm_core.h	(revision 37627)
@@ -153,7 +153,6 @@
     /* inline cache: keys */
     VALUE vmstat;
     VALUE klass;
-    VALUE refinements;
 
     /* inline cache: values */
     const rb_method_entry_t *me;
Index: compile.c
===================================================================
--- compile.c	(revision 37626)
+++ compile.c	(revision 37627)
@@ -954,7 +954,6 @@
 	}
     }
     ci->vmstat = 0;
-    ci->refinements = Qundef;
     ci->blockptr = 0;
     ci->recv = Qundef;
     ci->call = 0; /* TODO: should set default function? */
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 37626)
+++ vm_insnhelper.c	(revision 37627)
@@ -843,30 +843,19 @@
 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
Index: test/ruby/test_refinement.rb
===================================================================
--- test/ruby/test_refinement.rb	(revision 37626)
+++ test/ruby/test_refinement.rb	(revision 37627)
@@ -726,6 +726,7 @@
   end
 
   def test_inline_method_cache
+    skip "can't implement efficiently with the current implementation of refinements"
     c = InlineMethodCache::C.new
     f = Proc.new { c.foo }
     assert_equal("original", f.call)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]