alexlamsl
dbf8684287
Merge branch 'master' into harmony-v3.3.0
2017-12-24 19:19:24 +08:00
Alex Lam S.L
b29fc8b27c
improve transversal efficiency in collapse_vars ( #2611 )
...
fixes #2603
2017-12-18 03:00:05 +08:00
Alex Lam S.L
8f681b1d17
handle inline of function arguments ( #2590 )
...
fixes #2476
2017-12-15 13:28:30 +08:00
Alex Lam S.L
738fd52bc4
improve collapse_vars ( #2591 )
...
- handle single-use assignments other than `AST_VarDef`
- scan `AST_Call` for candidates
2017-12-14 15:31:35 +08:00
Alex Lam S.L
9a137e8613
drop local assign-only variable in return ( #2587 )
2017-12-14 02:59:59 +08:00
Alex Lam S.L
ef618332ea
fold cascade functionality into collapse_vars ( #2586 )
2017-12-14 01:20:36 +08:00
Alex Lam S.L
7f418978c9
recover lost opportunities from #2574 ( #2584 )
2017-12-13 18:20:53 +08:00
Alex Lam S.L
04cc395c35
improve collapse_vars on side-effect-free replacements ( #2583 )
2017-12-13 04:52:54 +08:00
Alex Lam S.L
ebfd5c5c74
fix AST_VarDef.may_throw() ( #2580 )
2017-12-12 03:30:25 +08:00
Alex Lam S.L
f2ad542679
fix collapse_vars on switch ( #2578 )
2017-12-11 18:11:09 +08:00
Alex Lam S.L
0e16d92786
handle exceptional flow correctly in collapse_vars ( #2574 )
...
fixes #2571
2017-12-11 00:16:02 +08:00
alexlamsl
c9dbe9deb1
Merge branch 'master' into harmony-v3.2.1
2017-12-03 11:59:41 +08:00
Alex Lam S.L
32def5ebf5
improve synergy between collapse_vars & unused ( #2521 )
2017-11-28 14:02:39 +08:00
Alex Lam S.L
ecc9f6b770
drop assignment in AST_VarDef.value ( #2522 )
...
fixes #2516
2017-11-28 13:08:40 +08:00
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