Alex Lam S.L
4956ad311b
benchmark gzipped output ( #2220 )
2017-07-09 01:44:59 +08:00
Alex Lam S.L
71ee91e716
handle duplicate argument names in collapse_vars ( #2215 )
2017-07-08 04:42:35 +08:00
Alex Lam S.L
4f70d2e28c
inlining of static methods & constants ( #2211 )
...
- guard by `unsafe`
- support `Array`, `Math`, `Number`, `Object` & `String`
fixes #2207
2017-07-07 05:35:32 +08:00
Alex Lam S.L
4b6ca5e742
inline property access of object literal ( #2209 )
...
- only if property value is side-effect-free
- guard by `unsafe`
fixes #2208
2017-07-06 21:51:58 +08:00
Alex Lam S.L
9306da3c58
suppress collapse_vars of this as call argument ( #2204 )
...
fixes #2203
2017-07-06 01:03:52 +08:00
Alex Lam S.L
1ac25fc032
improve compress granularity through typeofs ( #2201 )
...
fixes #2198
2017-07-05 19:20:33 +08:00
Alex Lam S.L
af0262b7e5
improve parenthesis emission ( #2196 )
...
- eliminate `throw` usages
- suppress extraneous parenthesis
- `new function() {foo.bar()}.baz`
- `for (function() { "foo" in bar; };;);`
2017-07-03 04:17:37 +08:00
Alex Lam S.L
8b69a3d18e
drop argument value after collapse_vars ( #2190 )
2017-07-02 04:28:11 +08:00
Alex Lam S.L
d40950b741
improve inline efficiency ( #2188 )
...
... by teaching `collapse_vars` some new tricks.
fixes #2187
2017-07-02 01:05:14 +08:00
Alex Lam S.L
bdeadffbf5
improve usability of name cache under minify() ( #2176 )
...
fixes #2174
2017-06-29 12:48:34 +08:00
Alex Lam S.L
f0a99125ee
improve unsafe_Func ( #2171 )
...
- minimise disturbance to `compute_char_frequency()`
- remove extraneous quotation marks
2017-06-27 23:53:42 +08:00
Alex Lam S.L
1e4de2e6d3
parse @global_defs as expressions ( #2169 )
...
- let parser rejects non-conformant input
- eliminate need for extraneous parenthesis
2017-06-27 10:31:19 +08:00
Alex Lam S.L
285401ced8
more tests for #2158 ( #2160 )
2017-06-25 14:21:48 +08:00
Alex Lam S.L
9db4c42380
fix cascade & collapse on property access of constants ( #2158 )
2017-06-24 21:30:06 +08:00
Alex Lam S.L
dc6bcaa18e
synchronise mangle.properties for minify() & test/compress ( #2151 )
2017-06-23 15:53:13 +08:00
Alex Lam S.L
3d5bc08185
fix reduce_vars on this ( #2145 )
...
fixes #2140
2017-06-23 04:44:57 +08:00
Alex Lam S.L
0692435f01
fix for-in loop parsing ( #2144 )
2017-06-23 04:14:30 +08:00
Alex Lam S.L
343ea326c2
ensure mangling works if catch reuses a scope variable ( #2123 )
...
fixes #2120
2017-06-20 02:14:05 +08:00
Alex Lam S.L
0a0f4f5591
make defensive copies when inline ( #2116 )
...
fixes #2114
2017-06-17 14:32:37 +08:00
Alex Lam S.L
931daa85bf
fix loss of context in collapse_vars & cascade ( #2112 )
...
fixes #2110
2017-06-16 21:18:43 +08:00
Alex Lam S.L
11e63bc335
correctly determine scope of AST_This ( #2109 )
...
fixes #2107
2017-06-16 14:54:46 +08:00
Alex Lam S.L
33405bb24b
enforce inline scope restriction ( #2106 )
...
fixes #2105
2017-06-16 03:21:38 +08:00
Alex Lam S.L
b85a358deb
suppress inline of this ( #2103 )
...
fixes #2101
2017-06-15 12:14:16 +08:00
Alex Lam S.L
43697958f3
avoid intermittent test time-out failures ( #2100 )
2017-06-15 04:47:57 +08:00
Alex Lam S.L
3f961bbba0
compute uses_arguments correctly in figure_out_scope() ( #2099 )
...
fixes #2097
2017-06-15 03:28:26 +08:00
Alex Lam S.L
0a1e523cd5
fix parsing of expect_stdout ( #2096 )
...
fixes #2095
2017-06-15 01:00:03 +08:00
Alex Lam S.L
41beae4dd7
cache web assets between CI runs ( #2089 )
...
- skip `test/jetstream.js` for `node@0.12 `
2017-06-14 11:53:10 +08:00
Ziad El Khoury Hanna
82db9188ac
fix CLI parsing of --source-map content ( #2088 )
...
fixes #2082
2017-06-13 16:30:46 +08:00
Alex Lam S.L
3dc9e140e4
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
2017-06-13 06:21:16 +08:00
Alex Lam S.L
fed0096556
allow expect_stdout to specify Error ( #2087 )
2017-06-13 04:57:26 +08:00
Alex Lam S.L
2bdc8802dd
fix variable accounting in inline ( #2085 )
...
fixes #2084
2017-06-13 01:40:14 +08:00
Alex Lam S.L
5ef7cb372a
suppress false positives for-in loops ( #2080 )
...
fixes #2079
2017-06-10 13:55:17 +08:00
Alex Lam S.L
4ad7b1dae4
fix portability of sandbox.run_code() on Node.js 0.1x ( #2078 )
2017-06-10 01:08:58 +08:00
Alex Lam S.L
9186859cb7
fix non-string parameters ( #2076 )
...
`Stream.write()` is not as versatile as `console.log()`
2017-06-10 00:11:40 +08:00
Alex Lam S.L
47c0713747
report test/ufuzz.js failures in process.stderr ( #2074 )
2017-06-09 15:56:28 +08:00
Alex Lam S.L
293c566d6c
marshal mangle[.properties].reserved from non-Array values ( #2072 )
2017-06-09 04:29:12 +08:00
Alex Lam S.L
9c306406f1
fix iteration over object with inherited properties ( #2068 )
...
fixes #2055
2017-06-08 03:27:03 +08:00
Alex Lam S.L
9db0695b10
fix cascade on multi-branch evaluations ( #2067 )
...
Partially reverts #2059 as this has better coverage and performance.
fixes #2062
2017-06-07 19:52:01 +08:00
Alex Lam S.L
f2af093402
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
2017-06-07 04:25:32 +08:00
Alex Lam S.L
b9ad53d1ab
fix inline handling of AST_Call.args ( #2059 )
2017-06-06 22:55:25 +08:00
Alex Lam S.L
b0eab71470
implement test/jetstream.js --debug ( #2058 )
2017-06-06 19:28:12 +08:00
Alex Lam S.L
3493a182b2
implement function inlining ( #2053 )
...
- empty body
- single `AST_Return`
- single `AST_SimpleStatement`
- avoid `/*#__PURE__*/`
Miscellaneous
- enhance single-use function substitution
fixes #281
2017-06-06 05:49:53 +08:00
Alex Lam S.L
27c5284d3d
workaround webkit parsing error ( #2056 )
...
apply `webkit` to jetstream tests
2017-06-06 04:06:42 +08:00
Alex Lam S.L
540220b91b
fix AST_Function scope invariance ( #2052 )
...
improve function name hack in `run_code()`
2017-06-04 19:27:43 +08:00
Alex Lam S.L
84634da4b5
add tests for AST_SymbolAccessor ( #2049 )
2017-06-03 16:08:10 +08:00
Alex Lam S.L
bac14ba881
fix non-identifier getter/setter name ( #2041 )
...
fixes #2040
2017-06-01 18:11:16 +08:00
Alex Lam S.L
ec095ed647
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
2017-06-01 04:33:05 +08:00
Alex Lam S.L
17e73121fa
enhance unsafe evaluate ( #2037 )
2017-06-01 00:56:28 +08:00
Alex Lam S.L
e9645e017f
introduce unsafe_Func ( #2033 )
...
Separate flag for #203 functionality.
2017-05-31 03:38:00 +08:00
Alex Lam S.L
1aa38051fb
better fix for #512 & #2010 ( #2019 )
...
- remove duplicated functionalities
- fix similar issue with `else`
2017-05-29 10:51:41 +08:00