diff options
author | nagachika <nagachika@ruby-lang.org> | 2021-05-22 15:51:37 +0900 |
---|---|---|
committer | nagachika <nagachika@ruby-lang.org> | 2021-05-22 15:51:37 +0900 |
commit | ddd720f8dcd98de6a250a152fa40c3c044d62383 (patch) | |
tree | 1540dd01081073e46f061030aff5998fbada8793 /compile.c | |
parent | 9c0df2e81c22e6e35f3c5d69a070c2a3cf67e320 (diff) |
merge revision(s) 5026f9a5d5012248729a0052cd6cec811748291b: [Backport #17868]
compile.c: stop the jump-jump optimization if the second has any
event
Fixes [Bug #17868]
---
compile.c | 3 ++-
test/ruby/test_settracefunc.rb | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2884,7 +2884,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal } else if (iobj != diobj && IS_INSN(&diobj->link) && IS_INSN_ID(diobj, jump) && - OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0)) { + OPERAND_AT(iobj, 0) != OPERAND_AT(diobj, 0) && + diobj->insn_info.events == 0) { /* * useless jump elimination: * jump LABEL1 |