aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--insns.def2
-rw-r--r--vm_exec.c3
-rw-r--r--vm_exec.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/insns.def b/insns.def
index 065371fe1d..61b61f6187 100644
--- a/insns.def
+++ b/insns.def
@@ -998,7 +998,7 @@ leave
if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
#if OPT_CALL_THREADED_CODE
- th->retval = val;
+ rb_ec_thread_ptr(ec)->retval = val;
return 0;
#else
return val;
diff --git a/vm_exec.c b/vm_exec.c
index a452d047b7..ce47ab2cc3 100644
--- a/vm_exec.c
+++ b/vm_exec.c
@@ -140,9 +140,10 @@ rb_vm_get_insns_address_table(void)
}
static VALUE
-vm_exec_core(rb_execution_cntext_t *ec, VALUE initial)
+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);
while (1) {
reg_cfp = ((rb_insn_func_t) (*GET_PC()))(ec, reg_cfp);
diff --git a/vm_exec.h b/vm_exec.h
index 1991172bd8..41e75bc234 100644
--- a/vm_exec.h
+++ b/vm_exec.h
@@ -60,7 +60,7 @@ error !
#define INSN_ENTRY(insn) \
static rb_control_frame_t * \
- FUNC_FASTCALL(LABEL(insn))(rb_thread_t *th, rb_control_frame_t *reg_cfp) {
+ FUNC_FASTCALL(LABEL(insn))(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) {
#define END_INSN(insn) return reg_cfp;}
@@ -161,7 +161,7 @@ default: \
#if OPT_CALL_THREADED_CODE
#define THROW_EXCEPTION(exc) do { \
- th->ec->errinfo = (VALUE)(exc); \
+ ec->errinfo = (VALUE)(exc); \
return 0; \
} while (0)
#else