mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_trace.c: remove duplicate flag
* vm_trace.c (rb_suppress_tracing): remove duplicate flag `tracing`, which equals to `ec->trace_arg != NULL`. and that `ec->trace_arg` points `dummy_trace_arg` means it was NULL at the beginning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
add309c496
commit
f5c5a1979a
1 changed files with 4 additions and 5 deletions
|
@ -381,14 +381,13 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg)
|
|||
rb_execution_context_t *ec = GET_EC();
|
||||
rb_vm_t *vm = rb_ec_vm_ptr(ec);
|
||||
enum ruby_tag_type state;
|
||||
const int volatile tracing = ec->trace_arg ? 1 : 0;
|
||||
rb_trace_arg_t dummy_trace_arg;
|
||||
dummy_trace_arg.event = 0;
|
||||
|
||||
if (!tracing) {
|
||||
if (!ec->trace_arg) {
|
||||
vm->trace_running++;
|
||||
ec->trace_arg = &dummy_trace_arg;
|
||||
}
|
||||
if (!ec->trace_arg) ec->trace_arg = &dummy_trace_arg;
|
||||
|
||||
raised = rb_ec_reset_raised(ec);
|
||||
|
||||
|
@ -402,8 +401,8 @@ rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg)
|
|||
rb_ec_reset_raised(ec);
|
||||
}
|
||||
|
||||
if (ec->trace_arg == &dummy_trace_arg) ec->trace_arg = NULL;
|
||||
if (!tracing) {
|
||||
if (ec->trace_arg == &dummy_trace_arg) {
|
||||
ec->trace_arg = NULL;
|
||||
vm->trace_running--;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue