diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-03 14:26:06 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-03 14:26:06 +0000 |
commit | cd6df5fb3c1e9b965071d6a92ed1c7d4a938560f (patch) | |
tree | e59051b5cb25f14ca7b6e45368118e083e762c98 /compile.c | |
parent | c10baca4aec21ed7c44abfb786916c2a38d0fc5a (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 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -243,9 +243,10 @@ struct iseq_compile_data_ensure_node_stack { #define ADD_TRACE(seq, line, event) \ do { \ if ((event) == RUBY_EVENT_LINE && ISEQ_COVERAGE(iseq) && \ + ISEQ_LINE_COVERAGE(iseq) && \ (line) > 0 && \ (line) != ISEQ_COMPILE_DATA(iseq)->last_coverable_line) { \ - RARRAY_ASET(ISEQ_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \ + RARRAY_ASET(ISEQ_LINE_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \ ISEQ_COMPILE_DATA(iseq)->last_coverable_line = (line); \ ADD_INSN1((seq), (line), trace, INT2FIX(RUBY_EVENT_COVERAGE)); \ } \ |