diff options
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -5520,17 +5520,15 @@ yycompile0(VALUE arg) parser->token_info_enabled = !compile_for_eval && RTEST(ruby_verbose); #endif #ifndef RIPPER - if (RUBY_DTRACE_PARSE_BEGIN_ENABLED()) { - RUBY_DTRACE_PARSE_BEGIN(ruby_sourcefile, - ruby_sourceline); +#define RUBY_DTRACE_PARSE_HOOK(name) \ + if (RUBY_DTRACE_PARSE_##name##_ENABLED()) { \ + RUBY_DTRACE_PARSE_##name(ruby_sourcefile, ruby_sourceline); \ } + RUBY_DTRACE_PARSE_HOOK(BEGIN); #endif n = yyparse((void*)parser); #ifndef RIPPER - if (RUBY_DTRACE_PARSE_END_ENABLED()) { - RUBY_DTRACE_PARSE_END(ruby_sourcefile, - ruby_sourceline); - } + RUBY_DTRACE_PARSE_HOOK(END); #endif ruby_debug_lines = 0; ruby_coverage = 0; |