aboutsummaryrefslogtreecommitdiffstats
path: root/compile.h
diff options
context:
space:
mode:
Diffstat (limited to 'compile.h')
-rw-r--r--compile.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/compile.h b/compile.h
index f0c7089218..9991232446 100644
--- a/compile.h
+++ b/compile.h
@@ -157,6 +157,11 @@ r_value(VALUE value)
new_insn_send(iseq, line, \
(VALUE)id, (VALUE)argc, (VALUE)block, (VALUE)flag))
+#define ADD_TRACE(seq, line, event) \
+ if (iseq->compile_data->option->trace_instruction) { \
+ ADD_INSN1(seq, line, trace, INT2FIX(event)); \
+ }
+
/* add label */
#define ADD_LABEL(seq, label) \
ADD_ELEM(seq, (LINK_ELEMENT *)label)