diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-06 07:19:17 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-06 07:19:17 +0000 |
commit | 55f93cb63f350c7705733f86923561363a297e00 (patch) | |
tree | f8a41988c73aa10a911f2465e70b31122b66d851 | |
parent | 9be95d2a71782e7cf88269ef3c38671fb8e681b3 (diff) |
vm_core.h (RUBY_EVENT_COVERAGE_BRANCH): renamed
This change moves RUBY_EVENT_COVERAGE from include/ruby/ruby.h to
vm_core.h and renames it to RUBY_EVENT_COVERAGE_BRANCH.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | compile.c | 2 | ||||
-rw-r--r-- | include/ruby/ruby.h | 2 | ||||
-rw-r--r-- | thread.c | 2 | ||||
-rw-r--r-- | vm_core.h | 3 |
4 files changed, 6 insertions, 3 deletions
@@ -288,7 +288,7 @@ struct iseq_compile_data_ensure_node_stack { rb_ary_push(branches, INT2FIX(last_line)); \ rb_ary_push(branches, INT2FIX(last_column)); \ rb_ary_push(branches, INT2FIX(counter_idx)); \ - ADD_INSN2((seq), (first_line), tracebranch, INT2FIX(RUBY_EVENT_COVERAGE), INT2FIX(counter_idx)); \ + ADD_INSN2((seq), (first_line), tracebranch, INT2FIX(RUBY_EVENT_COVERAGE_BRANCH), INT2FIX(counter_idx)); \ } \ } while (0) diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index ee873182e7..8745fb903a 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -2096,7 +2096,7 @@ int ruby_native_thread_p(void); #define RUBY_EVENT_TRACEPOINT_ALL 0xffff /* special events */ -#define RUBY_EVENT_COVERAGE 0x020000 +#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 /* internal events */ #define RUBY_INTERNAL_EVENT_SWITCH 0x040000 @@ -5106,7 +5106,7 @@ rb_set_coverages(VALUE coverages, int mode, VALUE me2counter) GET_VM()->coverage_mode = mode; rb_add_event_hook2((rb_event_hook_func_t) update_line_coverage, RUBY_EVENT_LINE, Qnil, RUBY_EVENT_HOOK_FLAG_SAFE | RUBY_EVENT_HOOK_FLAG_RAW_ARG); if (mode & COVERAGE_TARGET_BRANCHES) { - rb_add_event_hook2((rb_event_hook_func_t) update_branch_coverage, RUBY_EVENT_COVERAGE, Qnil, RUBY_EVENT_HOOK_FLAG_SAFE | RUBY_EVENT_HOOK_FLAG_RAW_ARG); + rb_add_event_hook2((rb_event_hook_func_t) update_branch_coverage, RUBY_EVENT_COVERAGE_BRANCH, Qnil, RUBY_EVENT_HOOK_FLAG_SAFE | RUBY_EVENT_HOOK_FLAG_RAW_ARG); } if (mode & COVERAGE_TARGET_METHODS) { rb_add_event_hook2((rb_event_hook_func_t) update_method_coverage, RUBY_EVENT_CALL, me2counter, RUBY_EVENT_HOOK_FLAG_SAFE | RUBY_EVENT_HOOK_FLAG_RAW_ARG); @@ -1753,6 +1753,9 @@ RUBY_SYMBOL_EXPORT_BEGIN int rb_thread_check_trap_pending(void); +/* #define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000 */ /* from vm_core.h */ +#define RUBY_EVENT_COVERAGE_BRANCH 0x010000 + extern VALUE rb_get_coverages(void); extern void rb_set_coverages(VALUE, int, VALUE); extern void rb_reset_coverages(void); |