aboutsummaryrefslogtreecommitdiff
path: root/test/compress/collapse_vars.js
AgeCommit message (Expand)Author
2017-11-28improve synergy between `collapse_vars` & `unused` (#2521)Alex Lam S.L
2017-11-28drop assignment in `AST_VarDef.value` (#2522)...fixes #2516Alex Lam S.L
2017-11-24fix argument/atom collision by `collapse_vars` (#2507)...fixes #2506Alex Lam S.L
2017-11-24eliminate invalid state caching in `collapse_vars` (#2502)...fixes #2497Alex Lam S.L
2017-11-13fix replacement logic in `collapse_vars` (#2475)Alex Lam S.L
2017-11-12allow symbol replacement on multiple occurrences (#2472)...- all-or-nothing replacement - avoid unmangleable names fixes #2436Alex Lam S.L
2017-11-11implement compress option `reduce_funcs` (#2466)...- inline single-use function declarations as expressions when permissible - depend on `reduce_vars` - enabled by default - disable for speed critical code fixes #2464Alex Lam S.L
2017-11-09fix multiple nested function substitutions (#2458)...fixes #2449Alex Lam S.L
2017-11-06consolidate & enhance `unused` (#2439)...- defer declaration removal in `collapse_vars` - account for `AST_SymbolFunarg` in deduplication - private accounting for `collapse_vars` - avoid issues with identity reference due to deep cloning fixes #2437Alex Lam S.L
2017-11-05maintain call argument order in `collapse_vars` (#2426)...fixes #2425Alex Lam S.L
2017-10-23deduplicate declarations regardless of `toplevel` (#2393)Alex Lam S.L
2017-10-22safer `properties` transform (#2391)...`{ a: x, b: y }.a` => `[ x, y ][0]` - `x` cannot be function containing `this` `[ x, y, z ][1]` => `(x, z, y)` - only if `z` is side-effect-freeAlex Lam S.L
2017-10-19enhance `collapse_vars` around lazy operations (#2369)Alex Lam S.L
2017-10-18fix `AST_PropAccess` in `collapse_vars` (take 3) (#2375)...Suppress scanning beyond assignment to `a.b`Alex Lam S.L
2017-10-17fix `AST_PropAccess` in `collapse_vars` (take 2) (#2372)...fixes #2364Alex Lam S.L
2017-10-17fix `AST_PropAccess` in `collapse_vars` (#2370)...fixes #2364Alex Lam S.L
2017-10-17account for side-effects from `AST_This` in `collapse_vars` (#2365)Alex Lam S.L
2017-10-09perform `reduce_vars` on safe literals (#2351)...- constant expression - single reference - same scope - not across loop bodyAlex Lam S.L
2017-10-08collapse `a.b` whenever safe (#2350)Alex Lam S.L
2017-09-20suppress `collapse_vars` of `this` into "use strict" (#2326)...fixes #2319Alex Lam S.L
2017-09-16handle LHS side-effects on `cascade` & `collapse_vars` (#2314)...fixes #2313Alex Lam S.L
2017-09-04fix `collapse_vars` on default function argument (#2299)...Avoid collision with local variable `undefined` under certain corner cases. fixes #2298Alex Lam S.L
2017-07-14drop `unused` compound assignments (#2230)...fixes #2226Alex Lam S.L
2017-07-08handle duplicate argument names in `collapse_vars` (#2215)Alex Lam S.L
2017-07-06suppress `collapse_vars` of `this` as call argument (#2204)...fixes #2203Alex Lam S.L
2017-07-02drop argument value after `collapse_vars` (#2190)Alex Lam S.L
2017-07-02improve `inline` efficiency (#2188)...... by teaching `collapse_vars` some new tricks. fixes #2187Alex Lam S.L
2017-06-06implement function inlining (#2053)...- empty body - single `AST_Return` - single `AST_SimpleStatement` - avoid `/*#__PURE__*/` Miscellaneous - enhance single-use function substitution fixes #281Alex Lam S.L
2017-05-12remove support for `const` (#1910)...As this is not part of ES5.Alex Lam S.L
2017-05-12fix invalid transform on `const` (#1919)...- preserve (re)assignment to `const` for runtime error - suppress `cascade` on `const`, as runtime behaviour is ill-definedAlex Lam S.L
2017-05-06enhance `collapse_vars` (#1862)...- extend expression types - `a++` - `a=x;` - extend scan range - `for(init;;);` - `switch(expr){case expr:}` - `a = x; a = a || y;` - terminate upon `debugger;` closes #1821 fixes #27 fixes #315 fixes #1858 Alex Lam S.L
2017-04-20improve `unused` (#1832)...- extract leading value with side-effects out of `var` statement - reduce scanning of `AST_Definitions` from 3 passes to just onceAlex Lam S.L
2017-04-19improve `collapse_vars` on `AST_Var` (#1828)...Perform the same cascaded scanning within `var` statement as we do on array of statements.Alex Lam S.L
2017-04-18clean up `collapse_vars` (#1826)...- remove overlap in functionality of singular, consecutive reference of constant value - remove workarounds for previous bugs in `lib/scope.js` - distribute recursive `collapse_single_use_vars()` calls to their respective `OPT(AST_Node)` - enable collapsing of variables within a single `AST_Definitions`Alex Lam S.L
2017-04-18support safe reassignments in `reduce_vars` (#1823)...`var a=1;a=2;x(a)` => `x(2)` fix pre-existing issues - reference counting on assignment - walking of anonymous functions - chained assignmentAlex Lam S.L
2017-04-06improve `pure_getters` (#1786)...- property access to `null` & `undefined` always has side effects - utilise `reduce_vars` to determine safe property access - may-be cases treated as side effects unless `unsafe`Alex Lam S.L
2017-03-26fix `delete` related issues in `collapse_vars` and `reduce_vars` (#1689)Alex Lam S.L
2017-03-24improve collapsible value detection (#1638)...- #1634 bars variables with cross-scope references in between to collapse - but if assigned value is side-effect-free, no states can be modified, so it is safe to moveAlex Lam S.L
2017-03-23account for cross-scope modifications in `collapse_vars` (#1634)...mostly done by @kzc fixes #1631Alex Lam S.L
2017-03-19make `expect_stdout` work on Node.js 0.12 (#1623)...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.Alex Lam S.L
2017-03-16make `collapse_vars` consistent with `toplevel` (#1608)...fixes #1605Alex Lam S.L
2017-03-07collapse_vars: do not replace a constant in loop condition or init (#1562)kzc
2017-03-03collapse_vars should not replace constant in for-in init section (#1538)...fixes #1537kzc
2017-03-02optimize trivial IIFEs returning constants (#1530)kzc
2017-02-21drop unused: toplevel, assign-only...- assign statement does not count towards variable usage by default - only works with assignments on the same scope level as declaration - can be disabled with `unused` set to "keep_assign" - `toplevel` to drop unused top-level variables and/or functions - `top_retain` to whitelist top-level exceptions closes #1450 alexlamsl
2016-05-27collapse_vars: Do not consider RegExp literals to be constants...Fixes #1100 kzc
2016-01-28collapse_vars: fix if/else and ternary operator side effectskzc
2016-01-28collapse_vars: fix bug in repeated var defs of same namekzc
2016-01-27fix bug in collapse_vars for right side of "||" and "&&"kzc
2016-01-27Collapse single use var definitions...Fix #721 kzc