ruby-changes:50513
From: nobu <ko1@a...>
Date: Sun, 4 Mar 2018 10:52:24 +0900 (JST)
Subject: [ruby-changes:50513] nobu:r62648 (trunk): vm_exec.c: reduced repeated same calls
nobu 2018-03-04 10:52:19 +0900 (Sun, 04 Mar 2018) New Revision: 62648 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62648 Log: vm_exec.c: reduced repeated same calls Modified files: trunk/vm_exec.c Index: vm_exec.c =================================================================== --- vm_exec.c (revision 62647) +++ vm_exec.c (revision 62648) @@ -143,7 +143,7 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L143 vm_exec_core(rb_execution_context_t *ec, VALUE initial) { register rb_control_frame_t *reg_cfp = ec->cfp; - rb_thread_t *th = rb_ec_thread_ptr(ec); + rb_thread_t *th; while (1) { reg_cfp = ((rb_insn_func_t) (*GET_PC()))(ec, reg_cfp); @@ -153,9 +153,9 @@ vm_exec_core(rb_execution_context_t *ec, https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L153 } } - if (rb_ec_thread_ptr(ec)->retval != Qundef) { + if ((th = rb_ec_thread_ptr(ec))->retval != Qundef) { VALUE ret = th->retval; - rb_ec_thread_ptr(ec)->retval = Qundef; + th->retval = Qundef; return ret; } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/