summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-14 22:35:13 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-14 22:35:13 +0000
commit7606806cd9a75cd2a9efc1b17f86a57230bd92a6 (patch)
tree678ebea2249bea7ad91bc5c8e0f07e2ed8ef74e4 /compile.c
parentdc9ce32864a99391ef8892946c769c0d5bdf1c41 (diff)
compile.c: drop freezestring insn on String#-@
Followup to r62039 and remove the redundant freezestring insn which was preventing deduplication from String#-@ * compile.c (iseq_peephole_optimize): drop freezestring insn on String#-@ [ruby-core:85542] [Bug #14475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 5bca0dca99..7d065b25d3 100644
--- a/compile.c
+++ b/compile.c
@@ -2851,11 +2851,11 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
struct rb_call_info *ci = (struct rb_call_info *)OPERAND_AT(niobj, 0);
/*
* freezestring debug_info
- * send <:+@, 0, ARG_SIMPLE>
+ * send <:+@, 0, ARG_SIMPLE> # :-@, too
* =>
- * send <:+@, 0, ARG_SIMPLE>
+ * send <:+@, 0, ARG_SIMPLE> # :-@, too
*/
- if (ci->mid == idUPlus &&
+ if ((ci->mid == idUPlus || ci->mid == idUMinus) &&
(ci->flag & VM_CALL_ARGS_SIMPLE) &&
ci->orig_argc == 0) {
ELEM_REMOVE(list);