aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-02 08:05:36 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-02 08:05:36 +0000
commit417240b7fb987e364421d4c4bfd77dd5bfea10c4 (patch)
tree349d7d5fefde37c5dcd2e964743f1e7595345370 /compile.c
parente86f66b33fcf4de4bdf6e1d86275f4decec2270e (diff)
downloadruby-417240b7fb987e364421d4c4bfd77dd5bfea10c4.tar.gz
* iseq.h: introduce ISEQ_COVERAGE() and ISEQ_COVERAGE_SET() macro.
* compile.c: use them. * iseq.c: ditto. * iseq.c (rb_iseq_coverage): added. * thread.c (update_coverage): use rb_iseq_coverage(). * vm_core.h: rename coverage field name to support this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 7951ae20cc..63ad6802cd 100644
--- a/compile.c
+++ b/compile.c
@@ -231,9 +231,9 @@ r_value(VALUE value)
#define ADD_TRACE(seq, line, event) \
do { \
- if ((event) == RUBY_EVENT_LINE && iseq->variable_body->coverage && \
+ if ((event) == RUBY_EVENT_LINE && ISEQ_COVERAGE(iseq) && \
(line) != ISEQ_COMPILE_DATA(iseq)->last_coverable_line) { \
- RARRAY_ASET(iseq->variable_body->coverage, (line) - 1, INT2FIX(0)); \
+ RARRAY_ASET(ISEQ_COVERAGE(iseq), (line) - 1, INT2FIX(0)); \
ISEQ_COMPILE_DATA(iseq)->last_coverable_line = (line); \
ADD_INSN1((seq), (line), trace, INT2FIX(RUBY_EVENT_COVERAGE)); \
} \