diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | awkgram.c | 2 | ||||
-rw-r--r-- | awkgram.y | 2 |
3 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2017-12-10 Arnold D. Robbins <arnold@skeeve.com> + + * awkgram.y: For '!' optimization on a string constant, don't + apply the optimization if it's a translatable string. Thanks + to Jeremy Feusi <jeremy@feusi.co> for the report. + 2017-11-25 Andrew J. Schorr <aschorr@telemetry-investments.com> * debug.c (do_set_var): As in interpret.h (Op_store_field), we should @@ -3817,7 +3817,7 @@ regular_print: } else { if (do_optimize && (yyvsp[0])->nexti == (yyvsp[0])->lasti && (yyvsp[0])->nexti->opcode == Op_push_i - && ((yyvsp[0])->nexti->memory->flags & (MPFN|MPZN)) == 0 + && ((yyvsp[0])->nexti->memory->flags & (MPFN|MPZN|INTLSTR)) == 0 ) { NODE *n = (yyvsp[0])->nexti->memory; if ((n->flags & STRING) != 0) { @@ -1717,7 +1717,7 @@ non_post_simp_exp } else { if (do_optimize && $2->nexti == $2->lasti && $2->nexti->opcode == Op_push_i - && ($2->nexti->memory->flags & (MPFN|MPZN)) == 0 + && ($2->nexti->memory->flags & (MPFN|MPZN|INTLSTR)) == 0 ) { NODE *n = $2->nexti->memory; if ((n->flags & STRING) != 0) { |