Alex Lam S.L
9b8deff64d
enhance pure_getters, reduce_vars & unused ( #4863 )
2021-04-24 07:17:30 +08:00
Alex Lam S.L
b89cc84c3a
fix corner case in pure_getters ( #4804 )
...
fixes #4803
2021-03-19 16:16:53 +08:00
Alex Lam S.L
77c9116c91
fix corner case in unsafe ( #4783 )
2021-03-16 09:42:28 +08:00
Alex Lam S.L
f52b0e7c31
fix corner case in side_effects ( #4752 )
...
fixes #4751
2021-03-08 04:19:51 +08:00
Alex Lam S.L
5359900b78
enhance compress on arrow and async functions ( #4616 )
2021-02-06 12:39:46 +08:00
Alex Lam S.L
fd7ad8e779
fix corner cases in collapse_vars ( #4591 )
...
fixes #4590
2021-01-24 22:15:43 +08:00
Alex Lam S.L
56fce2131c
fix corner case in pure_getters ( #4441 )
...
fixes #4440
2020-12-24 04:09:09 +08:00
Alex Lam S.L
55451e7b78
support const ( #4190 )
2020-10-12 01:18:57 +08:00
Alex Lam S.L
0b3705e82f
fix corner cases in inline ( #3507 )
...
fixes #3506
2019-10-22 15:41:55 +08:00
Alex Lam S.L
482e1baea3
enhance assignments & unused ( #3428 )
...
closes #3427
2019-05-29 01:21:08 +08:00
Alex Lam S.L
d538a73250
enhance side_effects ( #3410 )
2019-05-14 05:26:40 +08:00
alexlamsl
5ffc17d4aa
fix corner case in unused
2018-07-01 14:34:42 +08:00
Alex Lam S.L
36bca6934d
enhance collapse_vars ( #2952 )
...
- `a = b, b` => `a = b`
- `a.b = c, c()` => `(a.b = c)()`
2018-02-28 15:19:32 +08:00
Alex Lam S.L
29a71d3aae
more tests for #2938 ( #2940 )
2018-02-21 04:19:42 +08:00
Alex Lam S.L
39a907bde3
workaround pure_getters=true when dropping unused assignments ( #2939 )
...
fixes #2938
2018-02-20 17:38:40 +08:00
Alex Lam S.L
ec4202590d
drop assignments to constant expressions only ( #2839 )
...
fixes #2838
2018-01-23 02:49:54 +08:00
Alex Lam S.L
7a6d452b54
preserve constant modification under strict mode ( #2717 )
2018-01-04 15:53:53 +08:00
Alex Lam S.L
b95e3338d9
fix pure_getters on AST_Binary ( #2681 )
...
fixes #2678
2017-12-28 17:01:01 +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
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
4f0953f7e9
handle LHS side-effects on cascade & collapse_vars ( #2314 )
...
fixes #2313
2017-09-16 11:45: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
931daa85bf
fix loss of context in collapse_vars & cascade ( #2112 )
...
fixes #2110
2017-06-16 21:18:43 +08:00
Alex Lam S.L
3ca902258c
fix bugs with getter/setter ( #1926 )
...
- `reduce_vars`
- `side_effects`
- property access for object
- `AST_SymbolAccessor` as key names
enhance `test/ufuzz.js`
- add object getter & setter
- property assignment to setter
- avoid infinite recursion in setter
- fix & adjust assignment operators
- 50% `=`
- 25% `+=`
- 2.5% each for the rest
- avoid "Invalid array length"
- fix `console.log()`
- bypass getter
- curb recursive reference
- deprecate `-E`, always report runtime errors
2017-05-14 02:10:34 +08:00
Alex Lam S.L
c2a1bceb77
fix pure_getters for chained property access ( #1798 )
2017-04-07 17:06:01 +08:00
Alex Lam S.L
0f4cd73dcc
introduce "strict" to pure_getters ( #1795 )
2017-04-07 13:31:58 +08:00
Alex Lam S.L
06cdb74279
improve pure_getters ( #1786 )
...
- property access to `null` & `undefined` always has side effects
- utilise `reduce_vars` to determine safe property access
- may-be cases treated as side effects unless `unsafe`
2017-04-06 11:18:59 +08:00