ruby-changes:48845
From: nobu <ko1@a...>
Date: Fri, 1 Dec 2017 21:00:14 +0900 (JST)
Subject: [ruby-changes:48845] nobu:r60962 (trunk): vm_trace.c: remove duplicate flag
nobu 2017-12-01 21:00:09 +0900 (Fri, 01 Dec 2017) New Revision: 60962 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60962 Log: 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. Modified files: trunk/vm_trace.c Index: vm_trace.c =================================================================== --- vm_trace.c (revision 60961) +++ vm_trace.c (revision 60962) @@ -381,14 +381,13 @@ rb_suppress_tracing(VALUE (*func)(VALUE) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L381 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) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L401 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--; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/