aboutsummaryrefslogtreecommitdiffstats
path: root/vm_core.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 05:54:34 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-07 05:54:34 +0000
commit107feaf94f298ed3651c0c5a64c1dcf461fb1bf3 (patch)
tree2f445a553b2a50506c1e41c7971ae37bc9b2bcfe /vm_core.h
parentfce0bd0a73f2f70d267ff3cd3a074d4416376587 (diff)
downloadruby-107feaf94f298ed3651c0c5a64c1dcf461fb1bf3.tar.gz
* vm_trace.c (rb_exec_event_hooks): accepts pop_p.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/vm_core.h b/vm_core.h
index 2140778ade..fc0d611e29 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1708,8 +1708,7 @@ struct rb_trace_arg_struct {
VALUE path;
};
-void rb_threadptr_exec_event_hooks(struct rb_trace_arg_struct *trace_arg);
-void rb_threadptr_exec_event_hooks_and_pop_frame(struct rb_trace_arg_struct *trace_arg);
+void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, int pop_p);
#define EXEC_EVENT_HOOK_ORIG(ec_, flag_, self_, id_, called_id_, klass_, data_, pop_p_) do { \
const rb_event_flag_t flag_arg_ = (flag_); \
@@ -1724,6 +1723,7 @@ ruby_exec_event_hook_orig(rb_execution_context_t *ec, const rb_event_flag_t flag
VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
{
const rb_thread_t *th = rb_ec_thread_ptr(ec);
+
if ((th->event_hooks.events | th->vm->event_hooks.events) & flag) {
struct rb_trace_arg_struct trace_arg;
trace_arg.event = flag;
@@ -1736,8 +1736,7 @@ ruby_exec_event_hook_orig(rb_execution_context_t *ec, const rb_event_flag_t flag
trace_arg.data = data;
trace_arg.path = Qundef;
trace_arg.klass_solved = 0;
- if (pop_p) rb_threadptr_exec_event_hooks_and_pop_frame(&trace_arg);
- else rb_threadptr_exec_event_hooks(&trace_arg);
+ rb_exec_event_hooks(&trace_arg, pop_p);
}
}