Alex Lam S.L [Sat, 8 Jul 2017 04:53:20 +0000 (12:53 +0800)]
v3.0.24
Alex Lam S.L [Fri, 7 Jul 2017 20:42:35 +0000 (04:42 +0800)]
handle duplicate argument names in `collapse_vars` (#2215)
Alex Lam S.L [Thu, 6 Jul 2017 21:35:32 +0000 (05:35 +0800)]
inlining of static methods & constants (#2211)
- guard by `unsafe`
- support `Array`, `Math`, `Number`, `Object` & `String`
fixes #2207
Alex Lam S.L [Thu, 6 Jul 2017 13:51:58 +0000 (21:51 +0800)]
inline property access of object literal (#2209)
- only if property value is side-effect-free
- guard by `unsafe`
fixes #2208
Alex Lam S.L [Wed, 5 Jul 2017 17:03:52 +0000 (01:03 +0800)]
suppress `collapse_vars` of `this` as call argument (#2204)
fixes #2203
Alex Lam S.L [Wed, 5 Jul 2017 11:20:33 +0000 (19:20 +0800)]
improve `compress` granularity through `typeofs` (#2201)
fixes #2198
Alex Lam S.L [Mon, 3 Jul 2017 10:52:39 +0000 (18:52 +0800)]
minor clean-ups to `evaluate` (#2197)
Alex Lam S.L [Sun, 2 Jul 2017 20:17:37 +0000 (04:17 +0800)]
improve parenthesis emission (#2196)
- eliminate `throw` usages
- suppress extraneous parenthesis
- `new function() {foo.bar()}.baz`
- `for (function() { "foo" in bar; };;);`
Alex Lam S.L [Sun, 2 Jul 2017 19:23:38 +0000 (03:23 +0800)]
clean up `TreeWalker.pop()` (#2195)
Remove superfluous parameter.
Alex Lam S.L [Sun, 2 Jul 2017 18:10:56 +0000 (02:10 +0800)]
refactor `throw` usage within `compress` (#2193)
Eliminate exceptional constructs from normal control flow.
kzc [Sun, 2 Jul 2017 17:37:04 +0000 (13:37 -0400)]
document fast mangle-only minify mode (#2194)
Alex Lam S.L [Sun, 2 Jul 2017 09:24:22 +0000 (17:24 +0800)]
v3.0.23
Alex Lam S.L [Sat, 1 Jul 2017 20:28:11 +0000 (04:28 +0800)]
drop argument value after `collapse_vars` (#2190)
Alex Lam S.L [Sat, 1 Jul 2017 17:05:14 +0000 (01:05 +0800)]
improve `inline` efficiency (#2188)
... by teaching `collapse_vars` some new tricks.
fixes #2187
Alex Lam S.L [Fri, 30 Jun 2017 03:18:34 +0000 (11:18 +0800)]
v3.0.22
Alex Lam S.L [Thu, 29 Jun 2017 04:48:34 +0000 (12:48 +0800)]
improve usability of name cache under `minify()` (#2176)
fixes #2174
Alex Lam S.L [Wed, 28 Jun 2017 16:49:06 +0000 (00:49 +0800)]
v3.0.21
Alex Lam S.L [Tue, 27 Jun 2017 15:53:42 +0000 (23:53 +0800)]
improve `unsafe_Func` (#2171)
- minimise disturbance to `compute_char_frequency()`
- remove extraneous quotation marks
Alex Lam S.L [Tue, 27 Jun 2017 02:31:19 +0000 (10:31 +0800)]
parse `@global_defs` as expressions (#2169)
- let parser rejects non-conformant input
- eliminate need for extraneous parenthesis
Alex Lam S.L [Sun, 25 Jun 2017 07:05:05 +0000 (15:05 +0800)]
v3.0.20
Alex Lam S.L [Sun, 25 Jun 2017 06:21:48 +0000 (14:21 +0800)]
more tests for #2158 (#2160)
Alex Lam S.L [Sat, 24 Jun 2017 13:30:06 +0000 (21:30 +0800)]
fix `cascade` & `collapse` on property access of constants (#2158)
Alex Lam S.L [Fri, 23 Jun 2017 12:05:31 +0000 (20:05 +0800)]
refactor `compute_char_frequency()` (#2152)
- minimise maintenance when updating AST
- maximise code sharing between `master` & `harmony`
Alex Lam S.L [Fri, 23 Jun 2017 07:53:13 +0000 (15:53 +0800)]
synchronise `mangle.properties` for `minify()` & `test/compress` (#2151)
Alex Lam S.L [Fri, 23 Jun 2017 05:11:40 +0000 (13:11 +0800)]
refactor `Compressor.toplevel` (#2149)
Alex Lam S.L [Thu, 22 Jun 2017 22:59:53 +0000 (06:59 +0800)]
minimise `reduce_vars` cloning overhead (#2148)
Alex Lam S.L [Thu, 22 Jun 2017 20:44:57 +0000 (04:44 +0800)]
fix `reduce_vars` on `this` (#2145)
fixes #2140
Alex Lam S.L [Thu, 22 Jun 2017 20:14:30 +0000 (04:14 +0800)]
fix for-in loop parsing (#2144)
Alex Lam S.L [Wed, 21 Jun 2017 19:24:22 +0000 (03:24 +0800)]
v3.0.19
Alex Lam S.L [Mon, 19 Jun 2017 18:14:05 +0000 (02:14 +0800)]
ensure mangling works if catch reuses a scope variable (#2123)
fixes #2120
Alex Lam S.L [Sun, 18 Jun 2017 07:01:20 +0000 (15:01 +0800)]
v3.0.18
Alex Lam S.L [Sat, 17 Jun 2017 06:32:37 +0000 (14:32 +0800)]
make defensive copies when `inline` (#2116)
fixes #2114
Alex Lam S.L [Fri, 16 Jun 2017 13:18:43 +0000 (21:18 +0800)]
fix loss of context in `collapse_vars` & `cascade` (#2112)
fixes #2110
Alex Lam S.L [Fri, 16 Jun 2017 11:19:54 +0000 (19:19 +0800)]
in-place `tigten_body()` (#2111)
By reducing copies of `AST_Node` arrays, we should be able to reduce:
- memory pressure
- potential bugs caused by multiple references in AST
- duplicated executions of `OPT()`
Alex Lam S.L [Fri, 16 Jun 2017 06:54:46 +0000 (14:54 +0800)]
correctly determine scope of `AST_This` (#2109)
fixes #2107
Alex Lam S.L [Thu, 15 Jun 2017 19:21:38 +0000 (03:21 +0800)]
enforce `inline` scope restriction (#2106)
fixes #2105
Alex Lam S.L [Thu, 15 Jun 2017 10:59:37 +0000 (18:59 +0800)]
v3.0.17
Alex Lam S.L [Thu, 15 Jun 2017 04:14:16 +0000 (12:14 +0800)]
suppress `inline` of `this` (#2103)
fixes #2101
Alex Lam S.L [Wed, 14 Jun 2017 20:47:57 +0000 (04:47 +0800)]
avoid intermittent test time-out failures (#2100)
Alex Lam S.L [Wed, 14 Jun 2017 19:28:26 +0000 (03:28 +0800)]
compute `uses_arguments` correctly in `figure_out_scope()` (#2099)
fixes #2097
Alex Lam S.L [Wed, 14 Jun 2017 17:00:03 +0000 (01:00 +0800)]
fix parsing of `expect_stdout` (#2096)
fixes #2095
Alex Lam S.L [Wed, 14 Jun 2017 08:45:09 +0000 (16:45 +0800)]
v3.0.16
kzc [Wed, 14 Jun 2017 04:23:03 +0000 (00:23 -0400)]
add comment about quote_style and gzip (#2092)
Alex Lam S.L [Wed, 14 Jun 2017 03:53:10 +0000 (11:53 +0800)]
cache web assets between CI runs (#2089)
- skip `test/jetstream.js` for `node@0.12`
Ziad El Khoury Hanna [Tue, 13 Jun 2017 08:30:46 +0000 (10:30 +0200)]
fix CLI parsing of `--source-map content` (#2088)
fixes #2082
Alex Lam S.L [Mon, 12 Jun 2017 22:21:16 +0000 (06:21 +0800)]
add Node.js 8 to Travis CI (#2086)
- explicitly terminate `test/jetstream.js` upon completion
- log verbose output from `test/benchmark.js` & `test/jetstream.js`
- remove obsolete workaround for Travis CI
Alex Lam S.L [Mon, 12 Jun 2017 20:57:26 +0000 (04:57 +0800)]
allow `expect_stdout` to specify `Error` (#2087)
Alex Lam S.L [Mon, 12 Jun 2017 17:40:14 +0000 (01:40 +0800)]
fix variable accounting in `inline` (#2085)
fixes #2084
Alex Lam S.L [Sat, 10 Jun 2017 05:55:17 +0000 (13:55 +0800)]
suppress false positives for-in loops (#2080)
fixes #2079
Alex Lam S.L [Fri, 9 Jun 2017 17:08:58 +0000 (01:08 +0800)]
fix portability of `sandbox.run_code()` on Node.js 0.1x (#2078)
Alex Lam S.L [Fri, 9 Jun 2017 16:11:40 +0000 (00:11 +0800)]
fix non-string parameters (#2076)
`Stream.write()` is not as versatile as `console.log()`
Alex Lam S.L [Fri, 9 Jun 2017 07:56:28 +0000 (15:56 +0800)]
report `test/ufuzz.js` failures in `process.stderr` (#2074)
Alex Lam S.L [Thu, 8 Jun 2017 20:29:12 +0000 (04:29 +0800)]
marshal `mangle[.properties].reserved` from non-Array values (#2072)
Alex Lam S.L [Wed, 7 Jun 2017 19:27:03 +0000 (03:27 +0800)]
fix iteration over object with inherited properties (#2068)
fixes #2055
Alex Lam S.L [Wed, 7 Jun 2017 11:52:01 +0000 (19:52 +0800)]
fix `cascade` on multi-branch evaluations (#2067)
Partially reverts #2059 as this has better coverage and performance.
fixes #2062
Alex Lam S.L [Tue, 6 Jun 2017 20:25:32 +0000 (04:25 +0800)]
fix CLI output corruption (#2061)
Using `console.error()` & `console.log()` result in inconsistent formatting across Node.js versions.
Avoid this issue by directly writing to `process.stderr` & `process.stdout` instead.
Miscellaneous
- prettify invalid option listing
Alex Lam S.L [Tue, 6 Jun 2017 14:55:25 +0000 (22:55 +0800)]
fix `inline` handling of `AST_Call.args` (#2059)
Alex Lam S.L [Tue, 6 Jun 2017 11:28:12 +0000 (19:28 +0800)]
implement `test/jetstream.js --debug` (#2058)
Alex Lam S.L [Mon, 5 Jun 2017 21:49:53 +0000 (05:49 +0800)]
implement function inlining (#2053)
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
Alex Lam S.L [Mon, 5 Jun 2017 20:06:42 +0000 (04:06 +0800)]
workaround webkit parsing error (#2056)
apply `webkit` to jetstream tests
Alex Lam S.L [Sun, 4 Jun 2017 11:27:43 +0000 (19:27 +0800)]
fix `AST_Function` scope invariance (#2052)
improve function name hack in `run_code()`
Alex Lam S.L [Sat, 3 Jun 2017 08:08:10 +0000 (16:08 +0800)]
add tests for `AST_SymbolAccessor` (#2049)
Alex Lam S.L [Sat, 3 Jun 2017 06:00:59 +0000 (14:00 +0800)]
clean up `lib/parse.js` (#2047)
- remove unused definitions
- replace `array_to_hash()`
kzc [Fri, 2 Jun 2017 04:07:17 +0000 (00:07 -0400)]
better document behavior of unsafe_Func (#2043)
Alex Lam S.L [Thu, 1 Jun 2017 10:12:38 +0000 (18:12 +0800)]
v3.0.15
Alex Lam S.L [Thu, 1 Jun 2017 10:11:16 +0000 (18:11 +0800)]
fix non-identifier getter/setter name (#2041)
fixes #2040
Alex Lam S.L [Wed, 31 May 2017 20:33:05 +0000 (04:33 +0800)]
whitelist `unsafe` `evaluate` candidates (#2039)
- all arguments may accept constant values
- return constant value
- free of side effects
- available & identical across locales and runtime environments
Alex Lam S.L [Wed, 31 May 2017 16:56:28 +0000 (00:56 +0800)]
enhance `unsafe` `evaluate` (#2037)
kzc [Wed, 31 May 2017 13:52:43 +0000 (09:52 -0400)]
reformat mangle options section of README (#2036)
Alex Lam S.L [Wed, 31 May 2017 03:34:51 +0000 (11:34 +0800)]
v3.0.14
Alex Lam S.L [Tue, 30 May 2017 19:38:00 +0000 (03:38 +0800)]
introduce `unsafe_Func` (#2033)
Separate flag for #203 functionality.
Alex Lam S.L [Tue, 30 May 2017 17:56:52 +0000 (01:56 +0800)]
widen CLI parse error code fragment displayed (#2032)
fixes #2030
Alex Lam S.L [Mon, 29 May 2017 02:52:13 +0000 (10:52 +0800)]
v3.0.13
Alex Lam S.L [Mon, 29 May 2017 02:51:41 +0000 (10:51 +0800)]
better fix for #512 & #2010 (#2019)
- remove duplicated functionalities
- fix similar issue with `else`
Alex Lam S.L [Sun, 28 May 2017 14:57:20 +0000 (22:57 +0800)]
display default values in `--help options` (#2018)
Alex Lam S.L [Sun, 28 May 2017 10:21:44 +0000 (18:21 +0800)]
implement `--help options` (#2017)
Alex Lam S.L [Sat, 27 May 2017 20:09:40 +0000 (04:09 +0800)]
improve CLI usability (#2016)
Report supported options upon invalid option syntax.
fixes #1883
Alex Lam S.L [Sat, 27 May 2017 14:18:28 +0000 (22:18 +0800)]
extend `node_version` range on applicable tests (#2015)
Alex Lam S.L [Sat, 27 May 2017 10:08:09 +0000 (18:08 +0800)]
v3.0.12
Alex Lam S.L [Sat, 27 May 2017 09:44:59 +0000 (17:44 +0800)]
fix `hoist_funs` on block-scoped `function` under "use strict" (#2013)
Technically not part of ES5, but commonly used code exists in the wild.
Alex Lam S.L [Sat, 27 May 2017 05:41:49 +0000 (13:41 +0800)]
fix `if_return` on `AST_Defun` (#2010)
Previous fiix for #1052 perturbs declaration order of functions which leads to incorrect behaviour under "use strict".
kzc [Sat, 27 May 2017 05:17:30 +0000 (01:17 -0400)]
clarify what --mangle-props does (#2012)
kzc [Fri, 26 May 2017 18:28:43 +0000 (14:28 -0400)]
better document mangle properties options (#2009)
kzc [Fri, 26 May 2017 17:25:51 +0000 (13:25 -0400)]
fix and expand --mangle-props documentation (#2008)
fixes #2007
Alex Lam S.L [Fri, 26 May 2017 08:08:51 +0000 (16:08 +0800)]
fix `dead_code` on block-scoped `function` under "use strict" (#2006)
Technically not part of ES5, but commonly used code exists in the wild.
Alex Lam S.L [Thu, 25 May 2017 19:58:35 +0000 (03:58 +0800)]
clean up `lib/scope.js` (#2003)
fixes #2004
Alex Lam S.L [Wed, 24 May 2017 23:15:55 +0000 (07:15 +0800)]
report timing breakdown (#2000)
fix corner cases with `sourceMap`
fixes #1998
Alex Lam S.L [Wed, 24 May 2017 18:32:36 +0000 (02:32 +0800)]
ensure new line after `describe_ast()` (#1999)
Alex Lam S.L [Tue, 23 May 2017 18:30:09 +0000 (02:30 +0800)]
reinstate `describe_ast()` on CLI (#1996)
fixes #1995
Alex Lam S.L [Tue, 23 May 2017 14:26:59 +0000 (22:26 +0800)]
v3.0.11
Alex Lam S.L [Tue, 23 May 2017 12:25:48 +0000 (20:25 +0800)]
fix source map offset (#1993)
Account for whitespace insertions.
fixes #505
fixes #890
kzc [Mon, 22 May 2017 04:19:07 +0000 (00:19 -0400)]
add another minify() options example (#1988)
Alex Lam S.L [Sun, 21 May 2017 17:38:43 +0000 (01:38 +0800)]
improve usability of `global_defs` in `minify()` (#1987)
Use `@key` to `parse()` string value as `AST_Node`.
fixes #1986
kzc [Sat, 20 May 2017 20:55:03 +0000 (16:55 -0400)]
more refinement of minify() documentation (#1983)
Alex Lam S.L [Sat, 20 May 2017 17:30:17 +0000 (01:30 +0800)]
v3.0.10
kzc [Sat, 20 May 2017 14:09:51 +0000 (10:09 -0400)]
add "es5" to package.json keywords (#1980)
kzc [Sat, 20 May 2017 14:09:21 +0000 (10:09 -0400)]
document minify() option `toplevel` (#1979)
Alex Lam S.L [Sat, 20 May 2017 07:58:46 +0000 (15:58 +0800)]
enhance `if_return` to handle `return void...` (#1977)
fixes #512
kzc [Sat, 20 May 2017 02:49:35 +0000 (22:49 -0400)]
document 3.x minify() does not throw errors (#1975)
kzc [Fri, 19 May 2017 09:20:21 +0000 (05:20 -0400)]
document minify `warnings` and add an error example (#1973)