From 7a55395c5710625a8a60934061fc204540701644 Mon Sep 17 00:00:00 2001 From: ko1 Date: Sat, 10 Oct 2015 22:15:18 +0000 Subject: * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep) first for performance. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 205ec59708..850ef8bd30 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -165,6 +165,14 @@ vm_push_frame(rb_thread_t *th, th->cfp = cfp; + /* setup new frame */ + cfp->pc = (VALUE *)pc; + cfp->iseq = (rb_iseq_t *)iseq; + cfp->flag = type; + cfp->self = self; + cfp->block_iseq = NULL; + cfp->proc = 0; + /* setup vm value stack */ /* initialize local variables */ @@ -180,15 +188,10 @@ vm_push_frame(rb_thread_t *th, cfp->ep = sp; cfp->sp = sp + 1; + #if VM_DEBUG_BP_CHECK cfp->bp_check = sp + 1; #endif - cfp->pc = (VALUE *)pc; - cfp->iseq = (rb_iseq_t *)iseq; - cfp->flag = type; - cfp->self = self; - cfp->block_iseq = NULL; - cfp->proc = 0; if (VMDEBUG == 2) { SDR(); -- cgit v1.2.3