summaryrefslogtreecommitdiff
path: root/vm_exec.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 01:52:19 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-04 01:52:19 (GMT)
commitc9173b6a5ccaf9bb4d70e3faeb398287004c3cb5 (patch)
tree534ee7b07c24ffa1a7b66a9a96e22f300c266c19 /vm_exec.c
parent3bc92b8eac9e507797140ca9db1df98d3995dc75 (diff)
vm_exec.c: reduced repeated same calls
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.c')
-rw-r--r--vm_exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_exec.c b/vm_exec.c
index ce47ab2..0adaa7b 100644
--- a/vm_exec.c
+++ b/vm_exec.c
@@ -143,7 +143,7 @@ static VALUE
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, VALUE initial)
}
}
- 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 {