diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_insnhelper.c | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Sun Oct 11 06:19:49 2015 Koichi Sasada <ko1@atdot.net> + + * vm_insnhelper.c (vm_call_iseq_setup_normal): setup sp first + for performance. + Sun Oct 11 05:29:51 2015 Koichi Sasada <ko1@atdot.net> * 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; } |