Conversation
|
(Travis CI timed out.) |
|
Just to confirm: |
|
I'm positively surprised that This was successfully reduced: but oddly this was not: Edit: was it because the result is shorter? nope: |
That is a known quirk with
I borrow the logic from |
|
Another two quirks I've discovered is to do with Edit: #1476 |
273dff3 to
2f59795
Compare
|
Discovered by @kzc while testing with #1479, the following won't work with if (code == 16) {
var bitsLength = 2, bitsOffset = 3, what = len;
} else if (code == 17) {
var bitsLength = 3, bitsOffset = 3, what = (len = 0);
} else if (code == 18) {
var bitsLength = 7, bitsOffset = 11, what = (len = 0);
}
var repeatLength = this.getBits(bitsLength) + bitsOffset;Note the repeated |
|
master 7f8d72d produces: |
|
|
|
Specifically, these lines. But my new test case in f42a5db will cause even |
|
On the positive side, your new |
|
Can you squash + change commit description to "improve reduce_vars and fix a bug" ? |
f42a5db to
ea0310a
Compare
|
@alexlamsl Would you mind adding the test case from #1473 (comment) since it apparently exercises different logic than the test case you committed? |
- update modified flag between compress() passes - support IIFE arguments - fix corner case with multiple definitions
ea0310a to
73bc25b
Compare
|
@kzc test added to squashed commit |
|
(Travis CI, please try again? Thank you.) |
- update modified flag between compress() passes - support IIFE arguments - fix corner case with multiple definitions closes mishoo#1473
To improve upon the existing work of
reduce_vars(released in2.7.5) - to perform a rescan ofSymbolDef.modifiedafter each optimisation pass, and to treat IIFE invocation parameters as initialised variables.Care has been taken against performance regressions, measured via
test/benchmark.jsfrom #1460.