alexlamsl
7dea749f58
Merge branch 'master' into harmony-v3.3.3
2017-12-29 03:30:53 +08:00
Alex Lam S.L
5205dbcbf4
retain recursive function names ( #2667 )
...
fixes #2665
2017-12-27 07:00:12 +08:00
Alex Lam S.L
3ff625de7e
fix bugs on substituted AST_Defun ( #2661 )
...
fixes #2660
2017-12-27 05:31:37 +08:00
Alex Lam S.L
05e7d34ed4
improve unused over duplicate variable names ( #2656 )
2017-12-26 18:29:28 +08:00
alexlamsl
7de541f9c8
fix tests
2017-12-24 19:21:31 +08:00
alexlamsl
dbf8684287
Merge branch 'master' into harmony-v3.3.0
2017-12-24 19:19:24 +08:00
Alex Lam S.L
ef618332ea
fold cascade functionality into collapse_vars ( #2586 )
2017-12-14 01:20:36 +08:00
alexlamsl
21c986ff5b
Merge branch 'master' into harmony-v3.2.2
2017-12-10 14:12:24 +08:00
Alex Lam S.L
0aff037a35
improve unused on assign-only symbols ( #2568 )
2017-12-09 06:19:29 +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
Alex Lam S.L
f1e3ef5262
separate keep_classnames & keep_fnames ( #2510 )
...
fixes #2418
2017-11-25 16:31:52 +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
alexlamsl
df9c8dfd72
Merge branch 'master' into harmony-v3.1.7
2017-11-05 15:47:40 +08:00
Alex Lam S.L
5b4b07e9a7
extend function inlining safety checks ( #2430 )
2017-11-05 06:18:45 +08:00
alexlamsl
3ae34177a6
merge #2391 & #2393
2017-10-29 17:14:52 +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
alexlamsl
8891495789
Merge branch 'master' into harmony-v3.1.0
2017-09-10 15:39:33 +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
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
5ea1da2d42
handle AST_Expansion in collapse_vars & inline
2017-07-02 18:15:16 +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
Alex Lam S.L
ad139aa34d
fix side_effects on AST_Expansion ( #2165 )
...
fixes #2163
2017-06-27 01:13:00 +08:00
Alex Lam S.L
471db8a717
fix inline & unused on AST_Expansion ( #2138 )
...
- handle rest parameters
- suppress cases with spread arguments
fixes #2136
2017-06-22 01:39:11 +08:00
alexlamsl
daaf1273fa
Merge branch 'master' into harmony-v3.0.18
2017-06-18 15:49:49 +08:00
Alex Lam S.L
33405bb24b
enforce inline scope restriction ( #2106 )
...
fixes #2105
2017-06-16 03:21:38 +08:00
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +08:00
Alex Lam S.L
a7971f4e34
fix unused crash with top-level AST_Var ( #2066 )
...
fixes #2063
2017-06-07 19:12:35 +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
3db2001633
suppress unused on block variables ( #1969 )
...
fixes #1968
2017-05-19 00:28:19 +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
Alex Lam S.L
dee5a27516
enhance collapse_vars ( #1862 )
...
- extend expression types
- `a++`
- `a=x;`
- extend scan range
- `for(init;;);`
- `switch(expr){case expr:}`
- `a = x; a = a || y;`
- terminate upon `debugger;`
closes #1821
fixes #27
fixes #315
fixes #1858
2017-05-06 16:15:43 +08:00
Alex Lam S.L
45ce369480
fix AST_For.init patch-up in drop_unused() ( #1839 )
...
fixes #1838
2017-04-23 01:51:56 +08:00
Alex Lam S.L
f05d4f7af3
improve unused ( #1832 )
...
- extract leading value with side-effects out of `var` statement
- reduce scanning of `AST_Definitions` from 3 passes to just once
2017-04-20 13:06:14 +08:00
Alex Lam S.L
88e7a542cd
fix unused on labeled for-loop ( #1831 )
...
fixes #1830
2017-04-20 04:18:38 +08:00
Alex Lam S.L
4ffb6fce76
compress duplicated variable definitions ( #1817 )
...
These are surprisingly common, as people reuse the same variable name within loops or switch branches.
2017-04-17 17:11:29 +08:00
alexlamsl
0d8597e904
Merge branch 'master' into harmony-v2.8.22
2017-04-09 15:50:38 +08:00
Alex Lam S.L
cf72fe552f
fix delete corner cases ( #1799 )
...
- assignment
- boolean
- conditional
- sequence
2017-04-08 14:25:28 +08:00
alexlamsl
d717bf9ce8
Merge branch 'master' into harmony
2017-03-31 12:54:03 +08:00