Age | Commit message (Collapse) | Author |
|
fixes #3465
|
|
|
|
fixes #3387
|
|
|
|
|
|
|
|
The test expects a specific precision value that is not met on all V8 versions anymore due to a recent consolidation of different algorithms across the V8 code base.
This makes sure the preceision is tested against one digit less to keep the test working on all V8 versions.
Refs: https://chromium.googlesource.com/v8/v8/+/98453126c109016c9d32c6ebd89dd83f69dd8efb
Refs: https://github.com/nodejs/node/issues/25060#issuecomment-477953457
|
|
|
|
|
|
In Node.js 12, the formatting of console arguments will change slightly.
Previously, a string other than the first argument was formatted using
single quotes if the first argument was non-string. Now, quotes are
never added regardless of position of a string argument.
To make test compatible in all Node.js versions, I work around by
ensuring the first argument to console.log is a string which prevents
the quotes from being added on older versions of Node.js.
Ref: https://github.com/nodejs/node/pull/23162
|
|
|
|
|
|
|
|
fixes #2968
|
|
fixes #2926
|
|
fixes #2919
|
|
fixes #2916
|
|
|
|
fixes #2822
|
|
|
|
|
|
fixes #2535
|
|
- inline single-use function declarations as expressions when permissible
- depend on `reduce_vars`
- enabled by default
- disable for speed critical code
fixes #2464
|
|
- trim array items only if `side_effects`
- extend to non-identifier properties
|
|
|
|
`{ 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-free
|
|
- constant expression
- single reference
- same scope
- not across loop body
|
|
fixes #2231
|
|
- guard by `unsafe`
- support `Array`, `Math`, `Number`, `Object` & `String`
fixes #2207
|
|
- only if property value is side-effect-free
- guard by `unsafe`
fixes #2208
|
|
- 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
|