aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2017-03-03properly cover all cases of for-in loop variables (#1536)Alex Lam S.L
2017-03-03fix reference marking in for-in loops (#1535)...fixes #1533Alex Lam S.L
2017-03-03disable do{...}while(false) optimisation (#1534)...- fails to handle `break` in body fixes #1532Alex Lam S.L
2017-03-02optimize trivial IIFEs returning constants (#1530)kzc
2017-03-02trim unused invocation parameters (#1526)Alex Lam S.L
2017-03-02minor improvement to string optimisation (#1514)...- "" + "a" => "a" - "" + a + "b" => a + "b" - "a" + "" => "a" (improving on #45)Alex Lam S.L
2017-03-02v2.8.4Alex Lam S.L
2017-03-02fix corner cases in `reduce_vars` (#1524)...Avoid variable substitution in the following cases: - use of variable before declaration - declaration within conditional code blocks - declaration within loop body fixes #1518 fixes #1525Alex Lam S.L
2017-03-01v2.8.3Alex Lam S.L
2017-03-01fix crash on missing `props` to `string_template()` (#1523)...Patched up `make_node()` without `orig`. There may be other cases where `start` could be missing, so make it print "undefined" instead of crashing. fixes #1518Alex Lam S.L
2017-03-01v2.8.2Alex Lam S.L
2017-03-01invert `reduce_vars` tracking flag (#1519)...Modules like webpack and grunt-contrib-uglify still uses `ast.transform(compressor)` before `Compressor.compress(ast)` was introduced. Workaround this compatibility issue by deactivating `reduce_vars` in such case. Also fix use case with omitted `options` when calling `Compressor()`. fixes #1516Alex Lam S.L
2017-03-01fix `evaluate` on object getter & setter (#1515)Alex Lam S.L
2017-03-01v2.8.1Alex Lam S.L
2017-03-01temporarily disables `reduce_vars` (#1517)...... as we investigate #1516Alex Lam S.L
2017-02-28warn & drop `#__PURE__` iff IIFE is dropped (#1511)...- consolidate `side-effects` optimisations - improve string `+` optimisation - enhance literal & `conditionals` optimisationsAlex Lam S.L
2017-02-27v2.8.0Alex Lam S.L
2017-02-27improve error messages (#1506)...- better inheritance of `Error` sub-classes - mark parse error against source in CLI closes #235 closes #348 closes #524 closes #1356 closes #1405Alex Lam S.L
2017-02-27add harmony branch details in README (#1507)kzc
2017-02-26faster tree transversal (#1462)...- convert `[].forEach()` to for-loopsAlex Lam S.L
2017-02-26consolidate `evaluate` & `reduce_vars` (#1505)...- improve marking efficiency - apply smarter `const` replacement to `var` fixes #1501Alex Lam S.L
2017-02-25update docs for `pure_funcs` & `drop_console` (#1503)...closes #1362 closes #1399Alex Lam S.L
2017-02-25allow --in-source-map inline (#1490)...- limited to one input file (or `stdin`) - only works with built-in parser fixes #520Alex Lam S.L
2017-02-24Avoid using exports when undefined (#1471)...Makes direct usage within web browser easier, even if officially unsupported.Ondřej Španěl
2017-02-24Merge pull request #1485 from alexlamsl/merge-2.8.0...2.8.0 stagingAlex Lam S.L
2017-02-24enable `collapse_vars` & `reduce_vars` by default...- fix corner cases in `const` optimisation - deprecate `/*@const*/` fixes #1497 closes #1498 alexlamsl
2017-02-21Support marking a call as pure...A function call or IIFE with an immediately preceding comment containing `@__PURE__` or `#__PURE__` is deemed to be a side-effect-free pure function call and can potentially be dropped. Depends on `side_effects` option. `[#@]__PURE__` hint will be removed from comment when pure call is dropped. fixes #1261 closes #1448 kzc
2017-02-21Fix: AST_Accessor missing start / end tokens...fixes #1492 closes #1493 Ondřej Španěl
2017-02-21fix `pure_funcs` & improve `side_effects`...- only drops side-effect-free arguments - drop side-effect-free parts with discarded value from `AST_Seq` & `AST_SimpleStatement` closes #1494 alexlamsl
2017-02-21clean up `max_line_len`...- never exceed specified limit - otherwise warning is shown - enabled only for final output closes #1496 alexlamsl
2017-02-21introduce `unsafe_proto`...- `Array.prototype.slice` => `[].slice` closes #1491 alexlamsl
2017-02-21remove extraneous spaces between ++/+/--/-...fixes #1377 closes #1488 alexlamsl
2017-02-21Add .gitattributes to checkout lf eol style...closes #1487 Anthony Van de Gejuchte
2017-02-21improve `--beautify bracketize`...reduce whitespaces from if-else statements fixes #1482 closes #1483 alexlamsl
2017-02-21add benchmark & JetStream tests...- `test/benchmark.js` measures performance - `test/jetstream.js` verifies correctness - configurable mangle/compress/output options closes #1479 alexlamsl
2017-02-21enhance `global_defs`...- support arrays, objects & AST_Node - support `"a.b":1` on both cli & API - emit warning if variable is modified - override top-level variables fixes #1416 closes #1198 closes #1469 alexlamsl
2017-02-21evaluate AST_SymbolRef as parameter...fix invalid boolean conversion now exposed in `make_node_from_constant()` closes #1477 alexlamsl
2017-02-21improve reduce_vars and fix a bug...- update modified flag between compress() passes - support IIFE arguments - fix corner case with multiple definitions closes #1473 alexlamsl
2017-02-21improve keep_fargs & keep_fnames...- utilise in_use_ids instead of unreferenced() - drop_unused now up-to-date for subsequent passes closes #1476 alexlamsl
2017-02-21fix duplicated test names...previously test cases with the same name would be skipped except for the last one `test/run-test.js` will now report duplicated names as errors closes #1461 alexlamsl
2017-02-21smarter const replacement taking name length into account...closes #1459 kzc
2017-02-21clean up `negate_iife`...- 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 alexlamsl
2017-02-21improve string concatenation...shuffle associative operations to minimise parentheses and aid other uglification efforts closes #1454 alexlamsl
2017-02-21`-c sequences=N` suboptimal at N expression cutoff...N = 2: a; b; c; d; was: a, b; c; d; now: a, b; c, d; fixes #1455 closes #1457 alexlamsl
2017-02-21tweak do-while loops...- `do{...}while(false)` => `{...}` - clean up `AST_While` logic closes #1452 alexlamsl
2017-02-21fixes & improvements to [].join()...fixes - [a].join() => "" + a - ["a", , "b"].join() => "a,,b" - ["a", null, "b"].join() => "a,,b" - ["a", undefined, "b"].join() => "a,,b" improvements - ["a", "b"].join(null) => "anullb" - ["a", "b"].join(undefined) => "a,b" - [a + "b", c].join("") => a + "b" + c closes #1453 alexlamsl
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
2017-02-21fix stray else in compress with conditionals=false...closes #1449 kzc
2017-02-18enable typeof "undefined" for general use...move out of unsafe, guard corner case with screw_id8 instead closes #1446 alexlamsl
2017-02-18fix corner case in keep_fnames...happens when inner function: - just below top level - not referenced - `unused` is disabled closes #1445 alexlamsl