aboutsummaryrefslogtreecommitdiff
path: root/test/compress/negate-iife.js
AgeCommit message (Collapse)Author
2018-07-01fix corner case in `unused`alexlamsl
2018-03-16improve truthy compression (#3009)Alex Lam S.L
2017-06-06implement function inlining (#2053)Alex Lam S.L
- empty body - single `AST_Return` - single `AST_SimpleStatement` - avoid `/*#__PURE__*/` Miscellaneous - enhance single-use function substitution fixes #281
2017-05-02improve literal return optimization (#1860)kzc
2017-03-27fix typeof side effects (#1696)Alex Lam S.L
`statement_to_expression()` drops `typeof` even if it operates on undeclared variables. Since we now have `drop_side_effect_free()`, replace and remove this deprecated functionality.
2017-03-19make `expect_stdout` work on Node.js 0.12 (#1623)Alex Lam S.L
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.
2017-03-03process code with implicit return statement (#1522)Alex Lam S.L
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
2017-03-02optimize trivial IIFEs returning constants (#1530)kzc
2017-02-21fix duplicated test namesalexlamsl
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
2017-02-21clean up `negate_iife`alexlamsl
- 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
2016-08-17Fix negate_iife transform to return a correct tree for nested IIFEsRichard van Velzen
Fix for #1256, partially reverts d854523783b4
2016-08-17Fix negate_iife regression #1254kzc
2016-05-15Simplify iife `new` fixkzc
as suggested by @rvanvelzen. Added a test for IIFEs in nested contexts.
2016-05-09Do not apply negate_iife optimization to `new` expressionkzc
2013-12-29Conditional/call optimizationMihai Bazon
foo ? bar(x) : bar(y) ==> bar(foo ? x : y)
2013-08-20Move support for `negate_iife` in the compressor, rather than code generatorMihai Bazon
(the code generator doesn't maintain enough context to know whether the return value is important or discarded) Fixes #272