Alex Lam S.L
6ab73c7bd5
fix & improve AST_TemplateString ( #2410 )
...
- resolve `semicolons:false` ambiguity with tagged literals
- allow `side_effects` to work on template literals
- traverse `AST_TemplateString` properly
fixes #2401
2017-10-28 11:36:09 +08:00
Alex Lam S.L
7d9a8596a9
fix dead_code on AST_Destructuring ( #2392 )
...
fixes #2383
2017-10-23 00:34:34 +08:00
alexlamsl
c60fa67827
Merge branch 'master' into harmony-v3.1.5
2017-10-22 00:35:00 +08:00
Alex Lam S.L
c927cea632
unsafe fix-ups for #2351 ( #2379 )
2017-10-21 04:08:26 +08:00
Alex Lam S.L
0f2ef3367c
enhance collapse_vars around lazy operations ( #2369 )
2017-10-19 04:52:00 +08:00
Alex Lam S.L
7e5b5cac97
fix AST_PropAccess in collapse_vars (take 3) ( #2375 )
...
Suppress scanning beyond assignment to `a.b`
2017-10-18 02:54:51 +08:00
Alex Lam S.L
c1346e06b7
clean up lazy operator detection ( #2373 )
2017-10-17 23:25:45 +08:00
Alex Lam S.L
0d2fe8e3ef
fix AST_PropAccess in collapse_vars (take 2) ( #2372 )
...
fixes #2364
2017-10-17 22:59:15 +08:00
Alex Lam S.L
f2b9c11e2a
fix AST_PropAccess in collapse_vars ( #2370 )
...
fixes #2364
2017-10-17 18:33:03 +08:00
Alex Lam S.L
b6a7ca292e
deduplicate AST_Super & AST_This logic ( #2366 )
2017-10-17 04:19:53 +08:00
Alex Lam S.L
fe647b083e
account for side-effects from AST_This in collapse_vars ( #2365 )
2017-10-17 01:18:55 +08:00
alexlamsl
58a5608b66
Merge branch 'master' into harmony-v3.1.4
2017-10-16 12:32:50 +08:00
kzc
f496ac5c85
implement compress option computed_props ( #2361 )
...
transforms `{["computed"]: 1}` into `{computed: 1}`
2017-10-16 11:35:04 +08:00
Alex Lam S.L
b810e2f8da
perform reduce_vars on safe literals ( #2351 )
...
- constant expression
- single reference
- same scope
- not across loop body
2017-10-09 12:25:06 +08:00
Alex Lam S.L
1abe14296e
collapse a.b whenever safe ( #2350 )
2017-10-08 13:17:48 +08:00
kzc
336b1add4f
fix unsafe join() on array literal with spread ( #2347 )
...
fixes #2345
2017-10-06 00:57:00 +08:00
alexlamsl
4fac8076b8
Merge branch 'master' into harmony-v3.1.3
2017-10-01 12:42:40 +08:00
Alex Lam S.L
dd71639264
enhance reduce_vars for AST_Accessor ( #2339 )
...
fixes #2336
2017-10-01 03:01:50 +08:00
alexlamsl
bd84007cf4
Merge branch 'master' into harmony-v3.1.2
2017-09-24 02:20:47 +08:00
kzc
a784717fe2
allow RegExp for unsafe_methods compress option ( #2327 )
2017-09-21 00:48:16 +08:00
Alex Lam S.L
00f509405b
suppress collapse_vars of this into "use strict" ( #2326 )
...
fixes #2319
2017-09-20 05:23:20 +08:00
kzc
e8235657e4
add new compress option unsafe_methods for ecma >= 6 ( #2325 )
...
fixes #2321
2017-09-20 00:15:54 +08:00
alexlamsl
3b0b4d6abf
handle AST_Super in collapse_vars & side_effects
2017-09-17 05:09:36 +08:00
alexlamsl
d73500e8d1
Merge branch 'master' into harmony-v3.1.1
2017-09-17 04:43:43 +08:00
Alex Lam S.L
4f0953f7e9
handle LHS side-effects on cascade & collapse_vars ( #2314 )
...
fixes #2313
2017-09-16 11:45:19 +08:00
alexlamsl
8891495789
Merge branch 'master' into harmony-v3.1.0
2017-09-10 15:39:33 +08:00
Mateusz Burzyński
8158b1bdcf
Testing all leading comments against being PURE comments ( #2305 )
2017-09-10 02:08:15 +08:00
Alex Lam S.L
aacf3edc68
extend unsafe on pure global functions ( #2303 )
2017-09-07 22:08:34 +08:00
kzc
8b89072190
add Date and other known globals to unsafe compress option ( #2302 )
2017-09-07 02:44:26 +08:00
Alex Lam S.L
395a17ccda
fix collapse_vars on default function argument ( #2299 )
...
Avoid collision with local variable `undefined` under certain corner cases.
fixes #2298
2017-09-04 02:32:33 +08:00
Alex Lam S.L
3f355866cf
correctly count declarations after hoist_vars ( #2297 )
...
fixes #2295
2017-09-03 17:23:31 +08:00
kzc
2779a29a86
avoid generating ternary with spread ( #2293 )
...
fixes #2292
2017-08-31 00:57:07 +08:00
Alex Lam S.L
e5cf7972ea
fix unused patching of AST_For.init blocks ( #2289 )
...
fixes #2288
2017-08-29 01:10:04 +08:00
kzc
ae0f117da6
Introduce new compress option unsafe_arrows ( #2278 )
...
* Not always safe to convert a function expression to an arrow
function when code depends on the function prototype existing.
Fixes #2271
2017-08-16 22:51:26 +08:00
Alex Lam S.L
2bf8216e50
fix pure_getters on spread of objects ( #2275 )
2017-08-13 22:08:33 +08:00
kzc
4700c14855
implement object rest/spread ( #2265 )
...
- improve parse errors for destructuring spread elements
- `unsafe` for object literals with rest elements
Miscellaneous
- increase mocha unicode surrogate test timeout
2017-08-02 13:47:58 +08:00
kzc
d600c78d7b
have keep_quoted respect quoted method names ( #2258 )
...
fixes #2257
2017-07-28 19:42:12 +08:00
Alex Lam S.L
d3df2f985d
extend collapse_vars to let and const ( #2252 )
...
fixes #2250
2017-07-25 22:07:21 +08:00
alexlamsl
3a2b737c42
Merge branch 'master' into harmony-v3.0.25
2017-07-16 11:15:07 +08:00
Alex Lam S.L
9e1da9235e
ensure ie8 works with mangled properties ( #2238 )
...
fixes #2234
2017-07-15 22:50:59 +08:00
Alex Lam S.L
a5ffe2c23f
drop unused builtin globals under unsafe ( #2236 )
...
fixes #2233
2017-07-15 15:16:11 +08:00
Alex Lam S.L
9282e7b0c6
fix unsafe evaluate of Object static methods ( #2232 )
...
fixes #2231
2017-07-14 19:52:01 +08:00
Alex Lam S.L
5229cb2b1b
drop unused compound assignments ( #2230 )
...
fixes #2226
2017-07-14 00:39:34 +08:00
Alex Lam S.L
458e3e15f0
enhance passes ( #2229 )
...
- remove hardcoded upper limit
- continue based on node count reduction
- emit verbose statistics
fixes #2226
2017-07-13 02:18:59 +08:00
alexlamsl
ef63de6968
handle AST_Arrow IIFEs in collapse_vars
2017-07-08 14:27:06 +08:00
alexlamsl
2539fb8096
inline property access of AST_ConciseMethod
2017-07-08 14:25:58 +08:00
alexlamsl
a556dd2dcb
Merge branch 'master' into harmony-v3.0.24
2017-07-08 13:12:54 +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