From ad45aea45631a451ae0b4b4a5592468d0c4617c0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 10 Oct 2015 21:20:59 +0000 Subject: [PATCH] * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first for performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ vm_insnhelper.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2e19baf13c..7bb45d2f51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Oct 11 06:19:49 2015 Koichi Sasada + + * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first + for performance. + Sun Oct 11 05:29:51 2015 Koichi Sasada * vm.c (invoke_block_from_c): split this function into several diff --git a/vm_insnhelper.c b/vm_insnhelper.c index abb7aeb81d..205ec59708 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1387,14 +1387,13 @@ vm_call_iseq_setup_normal(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_ca 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; }