diff --git a/vm.c b/vm.c index cc2d713d2b..db61df74da 100644 --- a/vm.c +++ b/vm.c @@ -32,13 +32,13 @@ VM_EP_LEP(const VALUE *ep) } static inline const rb_control_frame_t * -rb_vm_search_cf_from_ep(const rb_thread_t * const th, const rb_control_frame_t *cfp, const VALUE * const ep) +rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep) { if (!ep) { return NULL; } else { - const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(th->ec); /* end of control frame pointer */ + const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec); /* end of control frame pointer */ while (cfp < eocfp) { if (cfp->ep == ep) { @@ -1478,7 +1478,7 @@ vm_iter_break(rb_thread_t *th, VALUE val) { rb_control_frame_t *cfp = next_not_local_frame(th->ec->cfp); const VALUE *ep = VM_CF_PREV_EP(cfp); - const rb_control_frame_t *target_cfp = rb_vm_search_cf_from_ep(th, cfp, ep); + const rb_control_frame_t *target_cfp = rb_vm_search_cf_from_ep(th->ec, cfp, ep); #if 0 /* raise LocalJumpError */ if (!target_cfp) { diff --git a/vm_insnhelper.c b/vm_insnhelper.c index fee37834d8..393e930b3b 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1105,7 +1105,7 @@ vm_throw_start(rb_thread_t *const th, rb_control_frame_t *const reg_cfp, enum ru else { ep = VM_ENV_PREV_EP(ep); base_iseq = base_iseq->body->parent_iseq; - escape_cfp = rb_vm_search_cf_from_ep(th, escape_cfp, ep); + escape_cfp = rb_vm_search_cf_from_ep(th->ec, escape_cfp, ep); VM_ASSERT(escape_cfp->iseq == base_iseq); } } @@ -1157,7 +1157,7 @@ vm_throw_start(rb_thread_t *const th, rb_control_frame_t *const reg_cfp, enum ru ep = VM_ENV_PREV_EP(ep); } - escape_cfp = rb_vm_search_cf_from_ep(th, reg_cfp, ep); + escape_cfp = rb_vm_search_cf_from_ep(th->ec, reg_cfp, ep); } else if (state == TAG_RETURN) { const VALUE *current_ep = GET_EP();