aboutsummaryrefslogtreecommitdiff
path: root/test/compress/sequences.js
AgeCommit message (Collapse)Author
2020-02-04fix corner case in `sequences` (#3704)Alex Lam S.L
fixes #3703
2020-01-28enhance `sequences` (#3693)Alex Lam S.L
2019-10-17fix corner case in `sequences` (#3491)Alex Lam S.L
fixes #3490
2019-05-12fix corner case in `assignments` (#3407)Alex Lam S.L
fixes #3406
2019-04-25enhance `side_effects` (#3384)Alex Lam S.L
2019-04-25enhance `side_effects` (#3383)Alex Lam S.L
2019-03-20fix corner case in `sequences` (#3350)Alex Lam S.L
2018-07-01fix corner case in `unused`alexlamsl
2018-05-03compress `AST_Sequence` within `AST_Call` (#3117)Alex Lam S.L
2018-02-28enhance `collapse_vars` (#2952)Alex Lam S.L
- `a = b, b` => `a = b` - `a.b = c, c()` => `(a.b = c)()`
2018-01-19enable `unsafe` for `test/ufuzz.js` (#2819)Alex Lam S.L
- introduce `unsafe_undefined` - safer `.toString()` compression Miscellaneous - rename `unsafe_Function`
2018-01-17extend `join_vars` & `sequences` (#2798)Alex Lam S.L
2018-01-01enhance `join_vars` & `sequences` (#2697)Alex Lam S.L
- nudge declarations without assignments - within `AST_BlockStatement` - across `AST_If`
2017-12-14fold `cascade` functionality into `collapse_vars` (#2586)Alex Lam S.L
2017-12-01improve `AST_For.init` & `AST_Switch.expression` compression (#2546)Alex Lam S.L
2017-09-16handle LHS side-effects on `cascade` & `collapse_vars` (#2314)Alex Lam S.L
fixes #2313
2017-07-03improve parenthesis emission (#2196)Alex Lam S.L
- eliminate `throw` usages - suppress extraneous parenthesis - `new function() {foo.bar()}.baz` - `for (function() { "foo" in bar; };;);`
2017-06-07fix `cascade` on multi-branch evaluations (#2067)Alex Lam S.L
Partially reverts #2059 as this has better coverage and performance. fixes #2062
2017-05-12remove support for `const` (#1910)Alex Lam S.L
As this is not part of ES5.
2017-05-12fix invalid transform on `const` (#1919)Alex Lam S.L
- preserve (re)assignment to `const` for runtime error - suppress `cascade` on `const`, as runtime behaviour is ill-defined
2017-04-19extend `cascade` into `a.b` (#1829)Alex Lam S.L
fixes #27
2017-04-12convert `AST_Seq` from binary tree to array (#1460)Alex Lam S.L
- rename `AST_Seq` to `AST_Sequence` - raise default sequences_limit from 200 to 800
2017-04-08fix `delete` corner cases (#1799)Alex Lam S.L
- assignment - boolean - conditional - sequence
2017-04-02fix corner cases in switch and undefined (#1762)Alex Lam S.L
- fix side effects in switch condition for singular blocks - fix `undefined` confusion with local variable - gate `OPT(AST_Switch)` with `switches` fixes #1758 fixes #1759
2017-03-27fix `cascade` on anonymous function reference (#1693)Alex Lam S.L
Unlike normal variables and even function definitions, these cannot be reassigned, even though assignment expressions would "leak" the assigned value as normal.
2017-03-26fix `cascade` on `delete` operator (#1687)Alex Lam S.L
Conditions including strict mode would make `delete` return `true` or `false`, and are too complex to be evaluated by the compressor. Suppress assignment folding into said operator. fixes #1685
2017-03-19make `expect_stdout` work on Node.js 0.12 (#1623)Alex Lam S.L
That particular version of Node.js has messed up error messages, so provide a version-specific workaround. Also fixed an formatting issue which would cause `expect_stdout` to fail if error message contains excerpts of input. Apply `expect_stdout` to more applicable tests.
2017-03-19fix AST_Binary.lift_sequences() (#1621)Alex Lam S.L
Commit eab99a1c fails to account for side effects from compound assignments.
2017-03-05improve `unsafe` on undefined (#1548)Alex Lam S.L
`unsafe` turns undefined keyword into a variable of the same name if found, but that interferes with other related optimisations. Keep track of such transformations to ensure zero information loss in the process.
2017-03-03process code with implicit return statement (#1522)Alex Lam S.L
Bookmarklet for instance implicitedly assumes a "completion value" without using `return`. The `expression` option now supports such use cases. Optimisations on IIFEs also enhanced. fixes #354 fixes #543 fixes #625 fixes #628 fixes #640 closes #1293
2017-02-21clean up `negate_iife`alexlamsl
- remove extra tree scanning phase for `negate_iife` - `negate_iife` now only deals with the narrowest form, i.e. IIFE sitting directly under `AST_SimpleStatement` - `booleans`, `conditionals` etc. will now take care the rest via more accurate accounting - `a(); void b();` => `a(); b();` fixes #1288 closes #1451
2017-02-21`-c sequences=N` suboptimal at N expression cutoffalexlamsl
N = 2: a; b; c; d; was: a, b; c; d; now: a, b; c, d; fixes #1455 closes #1457
2014-09-28Referencing a global is assumed to have side effects.Mihai Bazon
Close #550
2013-11-06Better fix for #343Mihai Bazon
We can in fact lift sequences, but only if the operation is assignment and the left-hand side has no side effects nor property access -- that should guarantee that whatever we place before it cannot affect the sense of the assignment. Dropped contrived test case (too hard to support it now), added a more meaningful one.
2012-10-30don't move expressions containing the binary `in` operator into the `for` ↵Mihai Bazon
initializer (opera can't parse it) close #25
2012-10-22more sequence optimizations (lift some sequences above binary/unary ↵Mihai Bazon
expressions so that we can avoid parens)
2012-09-24minor tests fixMihai Bazon
2012-09-17one more test for sequencesMihai Bazon
2012-08-22wrote more of the compressor and added some testsMihai Bazon