summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-14 17:07:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-14 17:07:47 +0000
commitc00265bbcc5deb1bcfcd0faa0cf8c4c42968de8e (patch)
tree490f0e9a09d9033bc181553e522e49c5b380cffe /compile.c
parent0965709f1e056cef3585131db54358fe74b2427a (diff)
downloadruby-c00265bbcc5deb1bcfcd0faa0cf8c4c42968de8e.tar.gz
compile.c: fixup TRACE
* compile.c (remove_unreachable_chunk): ignore TRACE elements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/compile.c b/compile.c
index 6d9e71194b..c270308acc 100644
--- a/compile.c
+++ b/compile.c
@@ -364,6 +364,7 @@ static void iseq_add_setlocal(rb_iseq_t *iseq, LINK_ANCHOR *const seq, int line,
#define IS_INSN(link) ((link)->type == ISEQ_ELEMENT_INSN)
#define IS_LABEL(link) ((link)->type == ISEQ_ELEMENT_LABEL)
#define IS_ADJUST(link) ((link)->type == ISEQ_ELEMENT_ADJUST)
+#define IS_TRACE(link) ((link)->type == ISEQ_ELEMENT_TRACE)
#define IS_INSN_ID(iobj, insn) (INSN_OF(iobj) == BIN(insn))
#define IS_NEXT_INSN_ID(link, insn) \
((link)->next && IS_INSN((link)->next) && IS_INSN_ID((link)->next, insn))
@@ -2320,6 +2321,9 @@ remove_unreachable_chunk(rb_iseq_t *iseq, LINK_ELEMENT *i)
break;
}
}
+ else if (IS_TRACE(i)) {
+ /* do nothing */
+ }
else return 0;
i = i->next;
}