diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-23 09:43:52 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-23 09:43:52 +0000 |
commit | 4a4627fb0d770269f876c711b642b7f7275b22d2 (patch) | |
tree | bf6fc088df929e6f1fadf9b6ee6eb16a81ae2632 /vm_trace.c | |
parent | a64801c1e95e127ad47de1d6d8fdb3f3390a9687 (diff) |
move "state" to rb_vm_tag.
* vm_core.h (rb_thread_t::tag_state): move to "rb_vm_tag::state".
Lifetime of "state" should be same as current tag.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_trace.c')
-rw-r--r-- | vm_trace.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/vm_trace.c b/vm_trace.c index d9997ec9cd..75c4693bc3 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -329,12 +329,10 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) if (th->trace_arg == 0 && /* check reentrant */ trace_arg->self != rb_mRubyVMFrozenCore /* skip special methods. TODO: remove it. */) { const VALUE errinfo = th->errinfo; - const enum ruby_tag_type outer_state = th->tag_state; const VALUE old_recursive = th->local_storage_recursive_hash; int state = 0; th->local_storage_recursive_hash = th->local_storage_recursive_hash_for_trace; - th->tag_state = TAG_NONE; th->errinfo = Qnil; th->vm->trace_running++; @@ -366,7 +364,6 @@ rb_threadptr_exec_event_hooks_orig(rb_trace_arg_t *trace_arg, int pop_p) } TH_JUMP_TAG(th, state); } - th->tag_state = outer_state; } } } @@ -387,7 +384,6 @@ VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg) { volatile int raised; - volatile enum ruby_tag_type outer_state; VALUE result = Qnil; rb_thread_t *volatile th = GET_THREAD(); enum ruby_tag_type state; @@ -399,8 +395,6 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg) if (!th->trace_arg) th->trace_arg = &dummy_trace_arg; raised = rb_threadptr_reset_raised(th); - outer_state = th->tag_state; - th->tag_state = TAG_NONE; TH_PUSH_TAG(th); if ((state = TH_EXEC_TAG()) == TAG_NONE) { @@ -419,7 +413,6 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg) TH_JUMP_TAG(th, state); } - th->tag_state = outer_state; return result; } |