Age | Commit message (Collapse) | Author | |
---|---|---|---|
2017-02-18 | fix corner case in keep_fnames | alexlamsl | |
happens when inner function: - just below top level - not referenced - `unused` is disabled closes #1445 | |||
2017-02-18 | fix crash in unsafe replacement of undefined | alexlamsl | |
remove extraneous call to AST_SymbolRef.reference() closes #1443 | |||
2017-02-18 | Improve optimizing `function() { if(c){return foo} bar();}` | Anthony Van de Gejuchte | |
closes #1437 | |||
2017-01-26 | update test (#1441) | Alex Lam S.L | |
improved reduce_vars & binary operands produce more optimal results | |||
2017-01-26 | fix mangling collision with keep_fnames (#1431) | Alex Lam S.L | |
* fix mangling collision with keep_fnames fixes #1423 * pass mangle options to figure_out_scope() bring command-line in line with minify() | |||
2017-01-26 | optimise binary operands with evaluate() (#1427) | Alex Lam S.L | |
- remove call to evaluate() in is_constant() and let nested optimize() does its job instead - reject RegExp in is_constant() and remove special case logic under collapse_vars - operands to conditionals optimisation are now always evaluate()-ed - throw error in constant_value() instead of returning undefined to catch possible bugs, similar to make_node_from_constant() - optimise binary boolean operators under `evaluate` instead of `conditionals` | |||
2017-01-26 | augment evaluate to extract within objects (#1425) | Alex Lam S.L | |
- gated by `unsafe` - replaces previous optimisation specific to String.length - "123"[0] => 1 - [1, 2, 3][0] => 1 - [1, 2, 3].length => 3 - does not apply to objects with overridden prototype functions | |||
2017-01-19 | add missing LHS cases which global_defs should avoid | alexlamsl | |
2017-01-19 | Have minify() and tests use figure_out_scope() as uglifyjs CLI does | kzc | |
Clarify docs, help and tests for --support-ie8 and screw_ie8=false | |||
2017-01-19 | Add preventive test involving non-ascii function identifiers | Anthony Van de Gejuchte | |
2016-11-29 | Add --mangle-props-debug and fix --mangle-props=unquoted collision | Ashley (Scirra) | |
Patch by @AshleyScirra Based on: PR #1316 Renamed the CLI debug option to --mangle-props-debug Fixes: #1321 name collision in --mangle-props=unquoted | |||
2016-10-27 | Pass mangle options to figure_out_scope before mangling in tests | Anthony Van de Gejuchte | |
2016-10-06 | Remove console.log and add extra test case | Richard van Velzen | |
2016-10-06 | Add an option to wrap IIFEs in parenthesis | Richard van Velzen | |
For #1307. | |||
2016-10-06 | Fix (typeof side_effect()) in boolean context | kzc | |
Fixes #1289 with suggestion by @rvanvelzen | |||
2016-10-01 | Optimize unmodified variables | alexlamsl | |
2016-09-01 | Account for side effects in `string + expr` optimization | kzc | |
2016-08-30 | implement optimization: (x = 2 * x) ---> (x *= 2) | kzc | |
2016-08-17 | Fix negate_iife transform to return a correct tree for nested IIFEs | Richard van Velzen | |
Fix for #1256, partially reverts d854523783b4 | |||
2016-08-17 | Fix negate_iife regression #1254 | kzc | |
2016-08-14 | Fix --mangle-props and --mangle-props=unquoted | kzc | |
Fixes: #1247 Fix --mangle-props and --name-cache inconsistency. AST_Dot and AST_Sub properties are now mangled by --mangle-props without regard to being used in an assignment statement. Note: if --mangle-props is used then *all* javascript files used must be uglified with the same mangle options. Fix the ignore_quoted=true mangle option, also known as `--mangle-props=unquoted`. If a given property is quoted anywhere it will not be mangled in any quoted or non-quoted context. | |||
2016-08-14 | Additional object literal property tests | kzc | |
2016-08-14 | Fix unneeded parens around unary args in new expression. | kzc | |
2016-07-15 | Keep const in own scope while compressing | Anthony Van de Gejuchte | |
- Fixes #1205 - Fix provided by @kzc | |||
2016-07-15 | Fix mangle with option keep_fnames=true for Safari. | kzc | |
Fixes: #1202 | |||
2016-06-30 | Enable --screw-ie8 by default. | kzc | |
catch identifier is mangled correctly for ES5 standards-compliant JS engines by default. Unconditionally use the ie8 if/do-while workaround whether or not --screw-ie8 is enabled. To support non-standard ie8 javascript use: uglifyjs --support-ie8 | |||
2016-06-30 | Move OctalEscapeSequence to read_escape_char | Anthony Van de Gejuchte | |
This should simplify and improve implementation, make it easier to implement template strings, and keep master a bit more in sync with harmony. Previous implementation wasn't broken, though the loop gave me the impression it could read infinite numbers and annoyed me a bit. It was also slightly unnecessary because the lookup involved only 3 characters. | |||
2016-06-21 | Fix conditional expressions of form (x ? -1 : -1) | kzc | |
Fixes #1154, #1153 | |||
2016-06-21 | Don't replace undefined, NaN and Infinity within with scope | kzc | |
2016-06-19 | Respect quote style in object literals | Shrey Banga | |
The option added in fbbaa42ee55a7f753f7cab9b1a905ccf73cf26d5 wasn't being respected inside object literals, so quoted property names would still be stripped out with this option. This is mostly a corner-case, but useful when the output is passed to something like the Closure compiler, where quoted property names can be used to prevent mangling. | |||
2016-06-15 | Fix test262 failures related to <, <=, in and instanceof | Anthony Van de Gejuchte | |
Fixed-by: @kzc | |||
2016-06-12 | Stop dropping args in new expressions | Anthony Van de Gejuchte | |
2016-06-12 | Escape null characters as \0 unless followed by 0-7. | David Bau | |
2016-06-12 | Don't drop unused if scope uses with statement | Anthony Van de Gejuchte | |
Fix provided by @kzc | |||
2016-06-08 | Fix uglify attempting to rewrite invalid new expressions | Anthony Van de Gejuchte | |
2016-05-27 | collapse_vars: Do not consider RegExp literals to be constants | kzc | |
Fixes #1100 | |||
2016-05-24 | Optimize if_return for single if/return cases. | kzc | |
Fixes #1089 | |||
2016-05-24 | Completely allow evaluating -0 | Richard van Velzen | |
2016-05-17 | Never produce -0 when evaluating expressions (like -"") | Richard van Velzen | |
Fix for #1085. The major case was already there, but more expressions can result in -0. | |||
2016-05-15 | Simplify iife `new` fix | kzc | |
as suggested by @rvanvelzen. Added a test for IIFEs in nested contexts. | |||
2016-05-09 | Do not apply negate_iife optimization to `new` expression | kzc | |
2016-04-26 | Add test cases for slightly more esoteric cases | Richard van Velzen | |
2016-04-26 | Add test case for hoisting a single function | Richard van Velzen | |
2016-04-23 | Hoist functions when reversing if (x) return; ... vs. if (!x) ... | Richard van Velzen | |
Fixes #1052 | |||
2016-04-19 | Add `passes` compress option. Fix duplicate compress warnings. | kzc | |
2016-04-13 | Prevent endless recursion when evaluating self-referencing consts | Richard van Velzen | |
Fix #1041 | |||
2016-04-12 | Add base54.reset() to compress tests | Richard van Velzen | |
Without this reset, char counts bleed to next tests. One test had a bad expect clause. | |||
2016-04-11 | Fix warnings for referenced non-hoisted functions. | kzc | |
Fixes #1034 Also added `expect_warnings` functionality to test framework. | |||
2016-04-02 | Optimize ternaries with boolean consequent or alternative. | kzc | |
Fixes #511 | |||
2016-03-24 | Escape all ASCII control characters within strings when using ascii_only. | kzc | |
Fixes #1017. Tab characters within strings are now output as `\t` in all output modes. |