diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-27 06:21:50 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-27 06:21:50 +0000 |
commit | 04dc3a0ca655011fc775d58a7bd933b8ed644ef7 (patch) | |
tree | f5a5aa1e090ef17c63ed444ca80529652840ca9f /vm_exec.c | |
parent | 88910e94a83e3360619685b6535081e9c6f81d12 (diff) |
vm_exec_core() accepts `ec` instead of `th`.
* vm_exec.c (vm_exec_core): accepts `ec` instead of `th`.
* vm_args.c (vm_caller_setup_arg_block): also accepts `ec`.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_exec.c')
-rw-r--r-- | vm_exec.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -45,7 +45,7 @@ vm_stack_overflow_for_insn(void) #if !OPT_CALL_THREADED_CODE static VALUE -vm_exec_core(rb_thread_t *th, VALUE initial) +vm_exec_core(rb_execution_context_t *ec, VALUE initial) { #if OPT_STACK_CACHING @@ -84,7 +84,7 @@ vm_exec_core(rb_thread_t *th, VALUE initial) #undef RESTORE_REGS #define RESTORE_REGS() \ { \ - VM_REG_CFP = th->ec->cfp; \ + VM_REG_CFP = ec->cfp; \ reg_pc = reg_cfp->pc; \ } @@ -98,11 +98,11 @@ vm_exec_core(rb_thread_t *th, VALUE initial) #if OPT_TOKEN_THREADED_CODE || OPT_DIRECT_THREADED_CODE #include "vmtc.inc" - if (UNLIKELY(th == 0)) { + if (UNLIKELY(ec == 0)) { return (VALUE)insns_address_table; } #endif - reg_cfp = th->ec->cfp; + reg_cfp = ec->cfp; reg_pc = reg_cfp->pc; #if OPT_STACK_CACHING @@ -140,26 +140,26 @@ rb_vm_get_insns_address_table(void) } static VALUE -vm_exec_core(rb_thread_t *th, VALUE initial) +vm_exec_core(rb_execution_cntext_t *ec, VALUE initial) { - register rb_control_frame_t *reg_cfp = th->ec->cfp; + register rb_control_frame_t *reg_cfp = ec->cfp; while (1) { - reg_cfp = ((rb_insn_func_t) (*GET_PC()))(th, reg_cfp); + reg_cfp = ((rb_insn_func_t) (*GET_PC()))(ec, reg_cfp); if (UNLIKELY(reg_cfp == 0)) { break; } } - if (th->retval != Qundef) { + if (rb_ec_thread_ptr(ec)->retval != Qundef) { VALUE ret = th->retval; - th->retval = Qundef; + rb_ec_thread_ptr(ec)->retval = Qundef; return ret; } else { - VALUE err = th->ec->errinfo; - th->ec->errinfo = Qnil; + VALUE err = ec->errinfo; + ec->errinfo = Qnil; return err; } } |