summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-03 14:26:06 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-03 14:26:06 +0000
commitcd6df5fb3c1e9b965071d6a92ed1c7d4a938560f (patch)
treee59051b5cb25f14ca7b6e45368118e083e762c98 /internal.h
parentc10baca4aec21ed7c44abfb786916c2a38d0fc5a (diff)
Refactor the internal data format for coverage measurement
To prepare new measuring targets: branch and method coverages. So far, iseq->coverage was an array of counts executed for line coverage. Now, it is a three-element array for each measuring target, whose first element is an array for line coverage. The second element is planned for branch coverage, and the third will be for method coverage. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 895b482d82..6b13725caf 100644
--- a/internal.h
+++ b/internal.h
@@ -1677,11 +1677,19 @@ VALUE rb_struct_lookup(VALUE s, VALUE idx);
struct timeval rb_time_timeval(VALUE);
/* thread.c */
+#define COVERAGE_INDEX_LINES 0
+#define COVERAGE_INDEX_BRANCHES 1
+#define COVERAGE_INDEX_METHODS 2
+#define COVERAGE_TARGET_LINES 1
+#define COVERAGE_TARGET_BRANCHES 2
+#define COVERAGE_TARGET_METHODS 4
+
VALUE rb_obj_is_mutex(VALUE obj);
VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
void rb_thread_execute_interrupts(VALUE th);
void rb_clear_trace_func(void);
VALUE rb_get_coverages(void);
+VALUE rb_default_coverage(int);
VALUE rb_thread_shield_new(void);
VALUE rb_thread_shield_wait(VALUE self);
VALUE rb_thread_shield_release(VALUE self);