diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-10 19:04:10 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2017-12-10 19:04:10 +0200 |
commit | d73659dcfd3a76103bf3772b075cc74d3e259fee (patch) | |
tree | 10f8369490eb46e96f54818c28134911a9f6de3f | |
parent | 3b8275d87abeb26a9989cb02fc85f62006ab70cd (diff) | |
download | egawk-d73659dcfd3a76103bf3772b075cc74d3e259fee.tar.gz egawk-d73659dcfd3a76103bf3772b075cc74d3e259fee.tar.bz2 egawk-d73659dcfd3a76103bf3772b075cc74d3e259fee.zip |
Don't optimize !_"...".
-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) { |