aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
AgeCommit message (Expand)Author
2016-06-30Fix spidermonkey AST (ESTree) export and import, Array holes...Fixes: #1156 #1161 Also add test to exercise Uglify after spidermonkey export/import of itself. kzc
2016-06-21Fix conditional expressions of form (x ? -1 : -1)...Fixes #1154, #1153 kzc
2016-06-21Don't replace undefined, NaN and Infinity within with scopekzc
2016-06-15Fix test262 failures related to <, <=, in and instanceof...Fixed-by: @kzc Anthony Van de Gejuchte
2016-06-12Don't drop unused if scope uses with statement...Fix provided by @kzc Anthony Van de Gejuchte
2016-05-27collapse_vars: Do not consider RegExp literals to be constants...Fixes #1100 kzc
2016-05-24Optimize if_return for single if/return cases....Fixes #1089 kzc
2016-05-24Completely allow evaluating -0Richard van Velzen
2016-05-17Never produce -0 when evaluating expressions (like -"")...Fix for #1085. The major case was already there, but more expressions can result in -0. Richard van Velzen
2016-05-15Simplify iife `new` fix...as suggested by @rvanvelzen. Added a test for IIFEs in nested contexts. kzc
2016-05-09Do not apply negate_iife optimization to `new` expressionkzc
2016-04-23Hoist functions when reversing if (x) return; ... vs. if (!x) ......Fixes #1052 Richard van Velzen
2016-04-19Add `passes` compress option. Fix duplicate compress warnings.kzc
2016-04-13Prevent endless recursion when evaluating self-referencing consts...Fix #1041 Richard van Velzen
2016-04-12Actually limit sequence length....Fix #1038 Mihai Bazon
2016-04-11Fix warnings for referenced non-hoisted functions....Fixes #1034 Also added `expect_warnings` functionality to test framework. kzc
2016-04-07Avoid using inherited hasOwnProperty...Fix #1031 Mihai Bazon
2016-04-02Optimize ternaries with boolean consequent or alternative....Fixes #511 kzc
2016-03-28Speedup `unused` compress option for already minified code...Fixes: #321 #917 #1022 kzc
2016-02-22boolean_expression ? true : false --> boolean_expressionkzc
2016-02-21Take operator || precendence into account for AST_If optimization....Fixes #979. kzc
2016-02-17preserve ThisBinding for side_effectsalexlamsl
2016-02-16Don't compress (0, eval)() to eval()Richard van Velzen
2016-02-16Preserve ThisBinding in conditionals & collapse_vars...Fixes #973 alexlamsl
2016-01-29collapse_vars: avoid replacement across AST_Case nodes to be on safe side eve...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
2016-01-05Fix hoisting the var in ForIn...Close #913 Mihai Bazon
2015-11-24#873 Fix `conditionals` optimizations with default compress optionskzc
2015-11-16Fix endless loop...Close #866 Mihai Bazon
2015-11-16Limit max iterations for tighten_body...Ref #866 Mihai Bazon
2015-11-11Rework has_directive...It's now available during tree walking, i.e. walker.has_directive("use asm"), rather than as part of the scope. It's thus no longer necessary to call `figure_out_scope` before codegen. Added special bits in the code generator to overcome the fact that it doesn't inherit from TreeWalker. Fix #861 Mihai Bazon
2015-10-29`return undefined` optimization no longer uses `return_void_0` optionkzc
2015-10-29optimize `return undefined` and `return void 0`kzc
2015-10-07Add proper support for "use asm"; blocks. Disable -c optimization within "use...kzc
2015-09-14Control keeping function arguments with a single optionVille Lautanala
2015-08-25Don't change sequences that influence lexical binding in calls...Fixes #782 Richard van Velzen
2015-08-10[Fix] --define replaces SymbolRefs in LHS of assignments...See #208 for context Christopher Chedeau
2015-07-29Advanced way to specify if a function call might have side effects. #400thorn0
2015-07-22Don't attempt to negate non-boolean AST_Binary...Fix #751 Mihai Bazon
2015-07-20Merge pull request #735 from kzc/master...optimizations for && and || where left side is constant expressionMihai Bazon
2015-06-30Don't drop parens in a * (b * c). Close #744Mihai Bazon
2015-06-14operator && and || optimization: add "else" before "if" as intendedkzc
2015-06-11optimizations for && and || where left side is constant expressionkzc
2015-05-18Fix compressing conditionals...Only transform foo() ? EXP(x) : EXP(y) into EXP(foo() ? x : y) if EXP has no side effects. Fix #710 Mihai Bazon
2015-05-04Avoid spurious brackets when dropping unused vars...Fix #702 Mihai Bazon
2015-04-17Drop NaN -> 0/0 transformation....Fix #687 Mihai Bazon
2015-04-13Fix compression of conditionals...Don't move the condition on the right side of an assignment when the left side may have side effects. Fix #677 Mihai Bazon