diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-10 22:15:18 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-10 22:15:18 +0000 |
commit | 930595cd353a90070f7833510d8499064857feaa (patch) | |
tree | 4279b394f8a29e7f38d4245486a18fcbcd9067a2 | |
parent | 0a40bcb20b27058f760ce855fc1860a540c49f43 (diff) |
* 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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_insnhelper.c | 15 |
2 files changed, 14 insertions, 6 deletions
@@ -1,3 +1,8 @@ +Sun Oct 11 07:09:19 2015 Koichi Sasada <[email protected]> + + * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep) + first for performance. + Sun Oct 11 06:21:50 2015 Koichi Sasada <[email protected]> * vm_eval.c, internal.h (rb_yield_1): added for performance which 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(); |