alexlamsl
77d18be073
Merge branch 'master' into harmony-v3.0.26
2017-07-23 12:53:13 +08:00
Alex Lam S.L
6a5e74b44e
unescape surrogate pairs only ( #2246 )
...
fixes #2242
2017-07-23 12:38: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
9e1da9235e
ensure ie8 works with mangled properties ( #2238 )
...
fixes #2234
2017-07-15 22:50:59 +08:00
Alex Lam S.L
a5ffe2c23f
drop unused builtin globals under unsafe ( #2236 )
...
fixes #2233
2017-07-15 15:16:11 +08:00
Alex Lam S.L
9282e7b0c6
fix unsafe evaluate of Object static methods ( #2232 )
...
fixes #2231
2017-07-14 19:52:01 +08:00
Alex Lam S.L
5229cb2b1b
drop unused compound assignments ( #2230 )
...
fixes #2226
2017-07-14 00:39:34 +08:00
Alex Lam S.L
458e3e15f0
enhance passes ( #2229 )
...
- remove hardcoded upper limit
- continue based on node count reduction
- emit verbose statistics
fixes #2226
2017-07-13 02:18:59 +08:00
alexlamsl
ef63de6968
handle AST_Arrow IIFEs in collapse_vars
2017-07-08 14:27:06 +08:00
alexlamsl
2539fb8096
inline property access of AST_ConciseMethod
2017-07-08 14:25:58 +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
4f70d2e28c
inlining of static methods & constants ( #2211 )
...
- guard by `unsafe`
- support `Array`, `Math`, `Number`, `Object` & `String`
fixes #2207
2017-07-07 05:35:32 +08:00
Alex Lam S.L
4b6ca5e742
inline property access of object literal ( #2209 )
...
- only if property value is side-effect-free
- guard by `unsafe`
fixes #2208
2017-07-06 21:51:58 +08:00
Alex Lam S.L
f5c46db738
improve AST_ConciseMethod compression ( #2202 )
...
p(){return x;} ---> p:()=>x
Optimization subject to the `compress` option `arrows`.
2017-07-06 01:21:04 +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
Alex Lam S.L
1ac25fc032
improve compress granularity through typeofs ( #2201 )
...
fixes #2198
2017-07-05 19:20:33 +08:00
kzc
fdbb1d09ef
Convert p: function(){} to p(){} in object literals ( #2199 )
...
when `compress` option `ecma` is 6 or greater.
2017-07-04 14:35:58 +08:00
Alex Lam S.L
af0262b7e5
improve parenthesis emission ( #2196 )
...
- eliminate `throw` usages
- suppress extraneous parenthesis
- `new function() {foo.bar()}.baz`
- `for (function() { "foo" in bar; };;);`
2017-07-03 04:17:37 +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
52cc21d999
remove extraneous ! before AST_Arrow ( #2185 )
2017-06-30 11:17:58 +08:00
kzc
a938fe5e1f
async arrow function IIFE fix ( #2184 )
...
fixes #2183
2017-06-30 10:12:42 +08:00
kzc
07a5a57336
fix await parens for property access and calls ( #2181 )
...
fixes #2179
2017-06-30 09:14:24 +08:00
alexlamsl
087bce508a
Merge branch 'master' into harmony-v3.0.21
2017-06-29 00:58:28 +08:00
Alex Lam S.L
4d5aeeddfb
compress AST_Arrow properly ( #2170 )
2017-06-28 01:06:30 +08:00
Alex Lam S.L
f0a99125ee
improve unsafe_Func ( #2171 )
...
- minimise disturbance to `compute_char_frequency()`
- remove extraneous quotation marks
2017-06-27 23:53:42 +08:00
Alex Lam S.L
1e4de2e6d3
parse @global_defs as expressions ( #2169 )
...
- let parser rejects non-conformant input
- eliminate need for extraneous parenthesis
2017-06-27 10:31:19 +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
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
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
dc6bcaa18e
synchronise mangle.properties for minify() & test/compress ( #2151 )
2017-06-23 15:53:13 +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
3d5bc08185
fix reduce_vars on this ( #2145 )
...
fixes #2140
2017-06-23 04:44:57 +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