mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
9be95d2a71
commit
55f93cb63f
4 changed files with 6 additions and 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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
2
thread.c
2
thread.c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue