ruby-changes:40026
From: ko1 <ko1@a...>
Date: Sun, 11 Oct 2015 07:15:36 +0900 (JST)
Subject: [ruby-changes:40026] ko1:r52107 (trunk): * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep)
ko1 2015-10-11 07:15:18 +0900 (Sun, 11 Oct 2015) New Revision: 52107 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52107 Log: * vm_insnhelper.c (vm_push_frame): initialize other than sp (and ep) first for performance. Modified files: trunk/ChangeLog trunk/vm_insnhelper.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52106) +++ ChangeLog (revision 52107) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Oct 11 07:09:19 2015 Koichi Sasada <ko1@a...> + + * 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@a...> * vm_eval.c, internal.h (rb_yield_1): added for performance which Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 52106) +++ vm_insnhelper.c (revision 52107) @@ -165,6 +165,14 @@ vm_push_frame(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L165 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, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L188 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(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/