alexlamsl
4f08c2f504
Merge branch 'master' into harmony-v3.2.0
2017-11-26 04:23:57 +08:00
Alex Lam S.L
eb001dc1d9
fix argument/atom collision by collapse_vars ( #2507 )
...
fixes #2506
2017-11-24 07:26:22 +08:00
Alex Lam S.L
8987780db6
eliminate invalid state caching in collapse_vars ( #2502 )
...
fixes #2497
2017-11-24 04:12:37 +08:00
alexlamsl
227b58812d
Merge branch 'master' into harmony-v3.1.10
2017-11-19 14:34:27 +08:00
Alex Lam S.L
49fbe9c5ac
fix replacement logic in collapse_vars ( #2475 )
2017-11-13 07:37:42 +08:00
Alex Lam S.L
c6cfa04d10
allow symbol replacement on multiple occurrences ( #2472 )
...
- all-or-nothing replacement
- avoid unmangleable names
fixes #2436
2017-11-12 22:31:47 +08:00
alexlamsl
a3fbb27194
update tests
2017-11-11 15:57:47 +08:00
alexlamsl
11c0b1e1f9
Merge branch 'master' into harmony-v3.1.9
2017-11-11 15:45:34 +08:00
Alex Lam S.L
3c74047368
implement compress option reduce_funcs ( #2466 )
...
- inline single-use function declarations as expressions when permissible
- depend on `reduce_vars`
- enabled by default
- disable for speed critical code
fixes #2464
2017-11-11 05:59:35 +08:00
Alex Lam S.L
1127a2caf3
fix multiple nested function substitutions ( #2458 )
...
fixes #2449
2017-11-09 23:30:00 +08:00
Alex Lam S.L
dd0a36119b
fix const under collapse_vars without unused ( #2454 )
...
fixes #2453
2017-11-08 02:10:46 +08:00
alexlamsl
bcf95ac02c
update tests
2017-11-07 04:49:57 +08:00
alexlamsl
e11cec1ab8
Merge branch 'master' into harmony
2017-11-07 04:30:40 +08:00
Alex Lam S.L
6c45101870
consolidate & enhance unused ( #2439 )
...
- defer declaration removal in `collapse_vars`
- account for `AST_SymbolFunarg` in deduplication
- private accounting for `collapse_vars`
- avoid issues with identity reference due to deep cloning
fixes #2437
2017-11-06 14:25:10 +08:00
alexlamsl
df9c8dfd72
Merge branch 'master' into harmony-v3.1.7
2017-11-05 15:47:40 +08:00
Alex Lam S.L
fe5a68f9d5
maintain call argument order in collapse_vars ( #2426 )
...
fixes #2425
2017-11-05 00:00:18 +08:00
alexlamsl
086cb33163
Merge branch 'master' into harmony-v3.1.6
2017-10-29 13:23:39 +08:00
Alex Lam S.L
8a713e449f
deduplicate declarations regardless of toplevel ( #2393 )
2017-10-23 01:00:50 +08:00
Alex Lam S.L
24aa07855b
safer properties transform ( #2391 )
...
`{ 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
2017-10-22 20:10:13 +08:00
alexlamsl
c60fa67827
Merge branch 'master' into harmony-v3.1.5
2017-10-22 00:35:00 +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
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
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
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
alexlamsl
bd84007cf4
Merge branch 'master' into harmony-v3.1.2
2017-09-24 02:20:47 +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
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
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
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
5229cb2b1b
drop unused compound assignments ( #2230 )
...
fixes #2226
2017-07-14 00:39:34 +08:00
alexlamsl
ef63de6968
handle AST_Arrow IIFEs in collapse_vars
2017-07-08 14:27:06 +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
9306da3c58
suppress collapse_vars of this as call argument ( #2204 )
...
fixes #2203
2017-07-06 01:03:52 +08:00
alexlamsl
e77b6d525c
Merge branch 'master' into harmony-v3.0.23
2017-07-02 17:47:21 +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
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +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
c391576d52
remove support for const ( #1910 )
...
As this is not part of ES5.
2017-05-12 14:57:41 +08:00
alexlamsl
daf44f2b21
Merge branch 'master' into harmony-v3.0.4
2017-05-12 05:13:11 +08:00
Alex Lam S.L
1d407e761e
fix invalid transform on const ( #1919 )
...
- preserve (re)assignment to `const` for runtime error
- suppress `cascade` on `const`, as runtime behaviour is ill-defined
2017-05-12 04:51:44 +08:00
alexlamsl
b4c18f6b83
Merge branch 'master' into harmony-v3.0.0
2017-05-07 15:34:16 +08:00