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

ruby-changes:40321

From: ko1 <ko1@a...>
Date: Sat, 31 Oct 2015 10:32:09 +0900 (JST)
Subject: [ruby-changes:40321] ko1:r52402 (trunk): * vm_insnhelper.c (vm_search_super_method): do not touch `ci' here.

ko1	2015-10-31 10:32:02 +0900 (Sat, 31 Oct 2015)

  New Revision: 52402

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

  Log:
    * vm_insnhelper.c (vm_search_super_method): do not touch `ci' here.

  Modified files:
    trunk/ChangeLog
    trunk/vm_insnhelper.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52401)
+++ ChangeLog	(revision 52402)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Oct 31 10:31:23 2015  Koichi Sasada  <ko1@a...>
+
+	* vm_insnhelper.c (vm_search_super_method): do not touch `ci' here.
+
 Sat Oct 31 10:22:49 2015  yui-knk  <spiketeika@g...>
 
 	* eval_error.c (undef_mesg_for): fix typo.  Before this commit
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 52401)
+++ vm_insnhelper.c	(revision 52402)
@@ -2246,11 +2246,12 @@ vm_super_outside(void) https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2246
 
 static void
 vm_search_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp,
-		       struct rb_calling_info *calling, struct rb_call_info *ci, struct rb_call_cache *cc)
+		       struct rb_calling_info *calling, const struct rb_call_info *ci, struct rb_call_cache *cc)
 {
     VALUE current_defined_class, klass;
     VALUE sigval = TOPN(calling->argc);
     const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
+    ID mid;
 
     if (!me) {
 	vm_super_outside();
@@ -2282,7 +2283,7 @@ vm_search_super_method(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2283
 		 " Specify all arguments explicitly.");
     }
 
-    ci->mid = me->def->original_id;
+    mid = me->def->original_id;
     klass = vm_search_normal_superclass(me->defined_class);
 
     if (!klass) {
@@ -2292,7 +2293,7 @@ vm_search_super_method(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2293
     }
     else {
 	/* TODO: use inline cache */
-	cc->me = rb_callable_method_entry(klass, ci->mid);
+	cc->me = rb_callable_method_entry(klass, mid);
 	CI_SET_FASTPATH(cc, vm_call_super_method, 1);
     }
 }

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

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