summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 13:19:14 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-29 13:19:14 +0000
commita288b87c4c4469b98d75125d3f24eb904d02ca28 (patch)
tree0f47735517ee34726666e9169924223794883fb0 /eval.c
parent3fd1b00528ad9209acd60c5badcdc0b374c50000 (diff)
EXEC_EVENT_HOOK(ec, ...)
* vm_core.h (EXEC_EVENT_HOOK): accepts `ec` instead of `th`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/eval.c b/eval.c
index 419e1d3..fa97b9d 100644
--- a/eval.c
+++ b/eval.c
@@ -577,7 +577,7 @@ setup_exception(rb_execution_context_t *ec, int tag, volatile VALUE mesg, VALUE
if (tag != TAG_FATAL) {
RUBY_DTRACE_HOOK(RAISE, rb_obj_classname(ec->errinfo));
- EXEC_EVENT_HOOK(rb_ec_thread_ptr(ec), RUBY_EVENT_RAISE, ec->cfp->self, 0, 0, 0, mesg);
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_RAISE, ec->cfp->self, 0, 0, 0, mesg);
}
}
@@ -796,17 +796,17 @@ rb_make_exception(int argc, const VALUE *argv)
void
rb_raise_jump(VALUE mesg, VALUE cause)
{
- rb_thread_t *th = GET_THREAD();
- const rb_control_frame_t *cfp = th->ec->cfp;
+ rb_execution_context_t *ec = GET_EC();
+ const rb_control_frame_t *cfp = ec->cfp;
const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
VALUE klass = me->owner;
VALUE self = cfp->self;
ID mid = me->called_id;
- rb_vm_pop_frame(th->ec);
- EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, me->def->original_id, mid, klass, Qnil);
+ rb_vm_pop_frame(ec);
+ EXEC_EVENT_HOOK(ec, RUBY_EVENT_C_RETURN, self, me->def->original_id, mid, klass, Qnil);
- rb_longjmp(th->ec, TAG_RAISE, mesg, cause);
+ rb_longjmp(ec, TAG_RAISE, mesg, cause);
}
/*!