aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-10 22:15:18 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-10 22:15:18 +0000
commit7a55395c5710625a8a60934061fc204540701644 (patch)
tree4279b394f8a29e7f38d4245486a18fcbcd9067a2 /vm_insnhelper.c
parent88a9f59590143ae0adc63ddc2e0aa6831871cb70 (diff)
downloadruby-7a55395c5710625a8a60934061fc204540701644.tar.gz
* 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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c15
1 files changed, 9 insertions, 6 deletions
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();