aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_insnhelper.c15
2 files changed, 14 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index b86496c8b5..10e54c184a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Oct 11 07:09:19 2015 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep)
+ first for performance.
+
Sun Oct 11 06:21:50 2015 Koichi Sasada <ko1@atdot.net>
* 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();