Skip to content

Commit

Permalink
* vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep)
Browse files Browse the repository at this point in the history
  first for performance.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed Oct 10, 2015
1 parent 0a40bcb commit 930595c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 9 additions & 6 deletions vm_insnhelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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();
Expand Down

0 comments on commit 930595c

Please sign in to comment.