Alex Lam S.L
4d5aeeddfb
compress AST_Arrow properly ( #2170 )
2017-06-28 01:06:30 +08:00
Alex Lam S.L
ad139aa34d
fix side_effects on AST_Expansion ( #2165 )
...
fixes #2163
2017-06-27 01:13:00 +08:00
alexlamsl
11afa816e3
Merge branch 'master' into harmony-v3.0.20
2017-06-25 16:43:44 +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
49f3de8397
toplevel shorthand for ecma ( #2157 )
2017-06-24 19:06:58 +08:00
Alex Lam S.L
94f93ad82d
support trailing commas in function parameter lists and calls ( #2156 )
...
fixes #2155
2017-06-24 17:34:14 +08:00
Alex Lam S.L
d1f085bce7
add new arrows compress option ( #2154 )
...
Convert ES5 style anonymous function expressions
to arrow functions if permissible by language semantics.
Note: `arrows` requires that the `ecma` compress option
is set to `6` or greater.
fixes #2150
2017-06-24 14:45:24 +08:00
Alex Lam S.L
7b95b63ca1
[ES6] support async arrow functions ( #2153 )
...
fixes #2102
2017-06-24 05:26:35 +08:00
Alex Lam S.L
94e5e00c03
refactor compute_char_frequency() ( #2152 )
...
- minimise maintenance when updating AST
- maximise code sharing between `master` & `harmony`
2017-06-23 20:05:31 +08:00
Alex Lam S.L
dc6bcaa18e
synchronise mangle.properties for minify() & test/compress ( #2151 )
2017-06-23 15:53:13 +08:00
Alex Lam S.L
d58b184835
refactor Compressor.toplevel ( #2149 )
2017-06-23 13:11:40 +08:00
Alex Lam S.L
137e4c4753
fix unused on AST_Destructuring ( #2146 )
2017-06-23 13:11:26 +08:00
Alex Lam S.L
b3a57ff019
minimise reduce_vars cloning overhead ( #2148 )
2017-06-23 06:59:53 +08:00
Alex Lam S.L
3d5bc08185
fix reduce_vars on this ( #2145 )
...
fixes #2140
2017-06-23 04:44:57 +08:00
Alex Lam S.L
0692435f01
fix for-in loop parsing ( #2144 )
2017-06-23 04:14:30 +08:00
Alex Lam S.L
b163b13a0b
fix export of keyword and redirection ( #2143 )
...
fixes #2141
fixes #2142
2017-06-23 03:49:30 +08:00
alexlamsl
f5931866e0
Merge branch 'master' into harmony-v3.0.19
2017-06-22 03:26:49 +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
Alex Lam S.L
8ba9e4e0da
fix toplevel on export ( #2137 )
...
fixes #2134
2017-06-22 00:31:17 +08:00
Alex Lam S.L
71556d00b5
correctly parse export of function & class ( #2135 )
2017-06-21 23:15:39 +08:00
Alex Lam S.L
8709753bfb
fix mangle on export ( #2133 )
...
- `export default ...`
- `export` with `AST_Destructuring`
fixes #2129
2017-06-21 14:22:09 +08:00
Alex Lam S.L
db877e8729
fix drop_unused() accounting of symbols within export function ( #2132 )
...
fixes #2131
2017-06-21 12:32:58 +08:00
Alex Lam S.L
11923e3ae8
reject non-toplevel import/export ( #2128 )
...
fixes #2124
2017-06-21 03:18:48 +08:00
Alex Lam S.L
62d1fbf645
support export statements properly ( #2126 )
...
- mangle & compress correctly with `toplevel`
- retain non-toplevel import/export
- parse & output `export { variable as name }`
- remove extraneous spaces from `beautify`
fixes #2038
fixes #2124
2017-06-21 00:51:36 +08:00
Alex Lam S.L
343ea326c2
ensure mangling works if catch reuses a scope variable ( #2123 )
...
fixes #2120
2017-06-20 02:14:05 +08:00
kzc
849ba79dee
retain names in export default class and function ( #2122 )
...
fixes #2121
2017-06-19 14:30:59 +08:00
alexlamsl
daaf1273fa
Merge branch 'master' into harmony-v3.0.18
2017-06-18 15:49:49 +08:00
Alex Lam S.L
0a0f4f5591
make defensive copies when inline ( #2116 )
...
fixes #2114
2017-06-17 14:32:37 +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
00e4f7b3c1
in-place tigten_body() ( #2111 )
...
By reducing copies of `AST_Node` arrays, we should be able to reduce:
- memory pressure
- potential bugs caused by multiple references in AST
- duplicated executions of `OPT()`
2017-06-16 19:19:54 +08:00
Alex Lam S.L
11e63bc335
correctly determine scope of AST_This ( #2109 )
...
fixes #2107
2017-06-16 14:54:46 +08:00
kzc
3fa862ce19
support shorthand property named "async" ( #2108 )
2017-06-16 12:18:18 +08:00
Alex Lam S.L
33405bb24b
enforce inline scope restriction ( #2106 )
...
fixes #2105
2017-06-16 03:21:38 +08:00
alexlamsl
78cf35f89c
Merge branch 'master' into harmony-v3.0.17
2017-06-15 19:01:36 +08:00
Alex Lam S.L
b85a358deb
suppress inline of this ( #2103 )
...
fixes #2101
2017-06-15 12:14:16 +08:00
kzc
100e18305d
first cut of async/await ( #2098 )
...
- async arrow functions not yet supported
fixes #1789
2017-06-15 06:15:48 +08:00
Alex Lam S.L
3f961bbba0
compute uses_arguments correctly in figure_out_scope() ( #2099 )
...
fixes #2097
2017-06-15 03:28:26 +08:00
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +08:00
Alex Lam S.L
68138f2281
fix reduce_vars on AST_Arrow ( #2091 )
...
fixes #2090
2017-06-14 16:40:37 +08:00
Alex Lam S.L
2bdc8802dd
fix variable accounting in inline ( #2085 )
...
fixes #2084
2017-06-13 01:40:14 +08:00
Alex Lam S.L
293c566d6c
marshal mangle[.properties].reserved from non-Array values ( #2072 )
2017-06-09 04:29:12 +08:00
Alex Lam S.L
9c306406f1
fix iteration over object with inherited properties ( #2068 )
...
fixes #2055
2017-06-08 03:27:03 +08:00
Alex Lam S.L
9db0695b10
fix cascade on multi-branch evaluations ( #2067 )
...
Partially reverts #2059 as this has better coverage and performance.
fixes #2062
2017-06-07 19:52:01 +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
b9ad53d1ab
fix inline handling of AST_Call.args ( #2059 )
2017-06-06 22:55:25 +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
27c5284d3d
workaround webkit parsing error ( #2056 )
...
apply `webkit` to jetstream tests
2017-06-06 04:06:42 +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
kzc
82fefc5d29
fix class expression statements ( #2051 )
...
- class expression statements require parentheses
- allow unused class expression statements to be dropped
fixes #1782
closes #1784
2017-06-04 02:45:26 +08:00
kzc
753932b302
drop unused arrow functions ( #2050 )
2017-06-04 00:20:46 +08:00