Age | Commit message (Collapse) | Author |
|
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
|
|
- all arguments may accept constant values
- return constant value
- free of side effects
- available & identical across locales and runtime environments
|
|
|
|
fixes #1964
|
|
As this is not part of ES5.
|
|
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
|
|
`Infinity = beyond` should not become `1/0 = beyond`
|
|
- assignment
- boolean
- conditional
- sequence
|
|
`delete Infinity` returns `false` where as `delete (1/0)` returns `true`
|
|
(#1763)
fixes #1760
fixes #1761
|
|
- migrate transformation logic from `OutputStream` to `Compressor`
- always turn `undefined` into `void 0` (unless `unsafe`)
- always keep `NaN` except when avoiding local variable redefinition
- introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition
supersedes #1723
fixes #1730
|
|
- move these optimisations out from `Compressor` to `OutputStream`
- fixes behaviour inconsistency when running uglified code from global or module levels due to redefinition
|
|
Operator has changed, so break out from rest of the rules.
fixes #1649
|
|
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.
|
|
Guarded by `unsafe` as `charAt()` can be overridden.
|
|
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
|
|
|
|
|
|
- consolidate `side-effects` optimisations
- improve string `+` optimisation
- enhance literal & `conditionals` optimisations
|
|
- improve marking efficiency
- apply smarter `const` replacement to `var`
fixes #1501
|
|
- fix corner cases in `const` optimisation
- deprecate `/*@const*/`
fixes #1497
closes #1498
|
|
fix invalid boolean conversion now exposed in `make_node_from_constant()`
closes #1477
|
|
- 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`
|
|
- 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
|
|
|
|
Fix for #1085. The major case was already there, but more expressions can result in -0.
|