summaryrefslogtreecommitdiff
path: root/compile.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 18:13:22 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 18:13:22 +0000
commit9a61579c1658502a87f62c857ec29cd831d5db41 (patch)
tree4e0a94fae643781bef9670c5f058f12100e6eccc /compile.h
parentab109c36f19aeaef088e975fa1de3ca6e6cce6f0 (diff)
* compile.h, insns.def: reduce insn operand of "trace".
* include/ruby/ruby.h: add RUBY_EVENT_COVERAGE event. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.h')
-rw-r--r--compile.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/compile.h b/compile.h
index 73a2567468..92f573c8b7 100644
--- a/compile.h
+++ b/compile.h
@@ -164,14 +164,11 @@ PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
#define ADD_TRACE(seq, line, event) \
do { \
- VALUE coverage = Qfalse; \
if ((event) == RUBY_EVENT_LINE && iseq->coverage && RARRAY_PTR(iseq->coverage)[(line) - 1] == Qnil) { \
- RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \
- coverage = iseq->coverage; \
- } \
- if (iseq->compile_data->option->trace_instruction || coverage) { \
- ADD_INSN2(seq, line, trace, INT2FIX(event), coverage); \
+ RARRAY_PTR(iseq->coverage)[(line) - 1] = INT2FIX(0); \
+ ADD_INSN1(seq, line, trace, INT2FIX(RUBY_EVENT_COVERAGE)); \
} \
+ ADD_INSN1(seq, line, trace, INT2FIX(event)); \
}while(0);
/* add label */