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

ruby-changes:40024

From: ko1 <ko1@a...>
Date: Sun, 11 Oct 2015 06:21:10 +0900 (JST)
Subject: [ruby-changes:40024] ko1:r52105 (trunk): * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first

ko1	2015-10-11 06:20:59 +0900 (Sun, 11 Oct 2015)

  New Revision: 52105

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

  Log:
    * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first
      for performance.

  Modified files:
    trunk/ChangeLog
    trunk/vm_insnhelper.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52104)
+++ ChangeLog	(revision 52105)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sun Oct 11 06:19:49 2015  Koichi Sasada  <ko1@a...>
+
+	* vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first
+	  for performance.
+
 Sun Oct 11 05:29:51 2015  Koichi Sasada  <ko1@a...>
 
 	* vm.c (invoke_block_from_c): split this function into several
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 52104)
+++ vm_insnhelper.c	(revision 52105)
@@ -1387,14 +1387,13 @@ vm_call_iseq_setup_normal(rb_thread_t *t https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1387
     const rb_iseq_t *iseq = def_iseq_ptr(me->def);
     VALUE *argv = cfp->sp - calling->argc;
     VALUE *sp = argv + iseq->body->param.size;
+    cfp->sp = argv - 1 /* recv */;
 
     vm_push_frame(th, iseq, VM_FRAME_MAGIC_METHOD, calling->recv,
 		  VM_ENVVAL_BLOCK_PTR(calling->blockptr), (VALUE)me,
 		  iseq->body->iseq_encoded + opt_pc, sp,
 		  iseq->body->local_size - iseq->body->param.size,
 		  iseq->body->stack_max);
-
-    cfp->sp = argv - 1 /* recv */;
     return Qundef;
 }
 

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

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