diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:02:29 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:02:29 +0000 |
commit | 9d64a542094efdbcf8fc8b192750d6b0343665c3 (patch) | |
tree | 79011dd5107df17b3f7e2c8533a5ed965906c139 /parse.y | |
parent | 1546ffed499aa40e905485b00293fbb530d7ebd1 (diff) | |
download | ruby-9d64a542094efdbcf8fc8b192750d6b0343665c3.tar.gz |
internal.h: RUBY_DTRACE_HOOK
* internal.h (RUBY_DTRACE_HOOK): extract from
RUBY_DTRACE_CREATE_HOOK for other type hooks.
* gc.c (RUBY_DTRACE_GC_HOOK): ditto.
* parse.y (RUBY_DTRACE_PARSE_HOOK): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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; |