alexlamsl
d73500e8d1
Merge branch 'master' into harmony-v3.1.1
2017-09-17 04:43:43 +08:00
Alex Lam S.L
182a47bfb1
improve source mapping ( #2312 )
...
fixes #2310
2017-09-15 12:46:48 +08:00
alexlamsl
e0e009ace2
Merge branch 'master' into harmony-v3.0.28
2017-08-20 00:35:46 +08:00
Erik Desjardins
16d40915b4
don't escape null characters as \0 when followed by any digit ( #2273 )
...
fixes #2272
2017-08-14 12:30:08 +08:00
kzc
2ed3f8db44
fix output of spread of a sequence ( #2268 )
...
fixes #2267
2017-08-03 00:40:19 +08:00
alexlamsl
98b850580b
fix for #2242 on harmony
2017-07-23 16:20:53 +08:00
alexlamsl
29011ea60a
remove ascii_identifiers
2017-07-23 12:54:50 +08:00
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
10a938cb79
enhance source mapping on IIFEs ( #2224 )
...
fixes #2213
2017-07-11 02:34:28 +08:00
alexlamsl
a556dd2dcb
Merge branch 'master' into harmony-v3.0.24
2017-07-08 13:12:54 +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
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
11afa816e3
Merge branch 'master' into harmony-v3.0.20
2017-06-25 16:43:44 +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
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
kzc
100e18305d
first cut of async/await ( #2098 )
...
- async arrow functions not yet supported
fixes #1789
2017-06-15 06:15:48 +08:00
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +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
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
Alex Lam S.L
1edbd6556f
fix beautify whitespace output within AST_Destructuring ( #2046 )
...
fixes #2044
2017-06-02 18:50:39 +08:00
alexlamsl
ee5c03f7f1
Merge branch 'master' into harmony-v3.0.15
2017-06-01 18:26:09 +08:00
Alex Lam S.L
bac14ba881
fix non-identifier getter/setter name ( #2041 )
...
fixes #2040
2017-06-01 18:11:16 +08:00
alexlamsl
37e549ff4f
Merge branch 'master' into harmony-v3.0.11
2017-05-23 22:29:04 +08:00
Alex Lam S.L
e667f0acb8
fix source map offset ( #1993 )
...
Account for whitespace insertions.
fixes #505
fixes #890
2017-05-23 20:25:48 +08:00
alexlamsl
5f29fced0a
Merge branch 'master' into harmony-v3.0.8
2017-05-18 14:54:18 +08:00
kzc
b1b918e6d6
better extends paren fix ( #1962 )
2017-05-18 02:36:29 +08:00
Alex Lam S.L
569c21e952
improve RegExp handling ( #1959 )
...
- remove `options.output.unescape_regexps`
- preserve original pattern whenever possible
fixes #54
fixes #1929
2017-05-17 20:10:50 +08:00
Alex Lam S.L
87c3a2c0ce
remove space_colon ( #1960 )
...
Always emit space after colon when `options.output.beautify` is enabled.
2017-05-17 14:07:34 +08:00
kzc
ebb469e4cd
fix class extends expression ( #1956 )
2017-05-17 03:29:25 +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
Alex Lam S.L
2433bb4e52
fix Unicode handling in parser ( #1884 )
...
There was an implicit assumption that first character within surrogate header range implies the next character must form a surrogate pair, which is not necessarily true.
2017-05-09 01:58:31 +08:00
alexlamsl
b4c18f6b83
Merge branch 'master' into harmony-v3.0.0
2017-05-07 15:34:16 +08:00
kzc
73d6438773
fix \\n and \\r in template strings ( #1857 )
...
fixes #1856
2017-04-30 17:05:32 +08:00
kzc
5c6316a37d
fix class method formatting ( #1853 )
...
fixes #1852
2017-04-29 18:13:25 +08:00
Alex Lam S.L
ca32a09032
fix label-related bugs ( #1835 )
...
- deep cloning of `AST_LabeledStatement`
- `L:do{...}while(false)`
- empty statement with label within block
extend `test/ufuzz.js`
- generate labels for blocks & loops
- generate for-in statements
- skip suspicious option search if `minify()` errs
fixes #1833
2017-04-22 22:15:04 +08:00
Alex Lam S.L
ec443e422c
unify CLI & API under minify() ( #1811 )
...
- rename `screw_ie8` to `ie8`
- rename `mangle.except` to `mangle.reserved`
- rename `mangle.properties.ignore_quoted` to `mangle.properties.keep_quoted`
- compact `sourceMap` options
- more stringent verification on input `options`
- toplevel shorthands
- `ie8`
- `keep_fnames`
- `toplevel`
- `warnings`
- support arrays and unquoted string values on CLI
- drop `fromString` from `minify()`
- `minify()` no longer handles any `fs` operations
- unify order of operations for `mangle_properties()` on CLI & API
- `bin/uglifyjs` used to `mangle_properties()` before even `Compressor`
- `minify()` used to `mangle_properties()` after `Compressor` but before `mangle_names()`
- both will now do `Compressor`, `mangle_names()` then `mangle_properties()`
- `options.parse` / `--parse` for parser options beyond `bare_returns`
- add `mangle.properties.builtins` to disable built-in reserved list
- disable with `--mangle-props builtins` on CLI
- `warnings` now off by default
- add `--warn` and `--verbose` on CLI
- drop `--enclose`
- drop `--export-all`
- drop `--reserved-file`
- use `--mangle reserved` instead
- drop `--reserve-domprops`
- enabled by default, disable with `--mangle-props domprops`
- drop `--prefix`
- use `--source-map base` instead
- drop `--lint`
- remove `bin/extract-props.js`
- limit exposure of internal APIs
- update documentations
closes #96
closes #102
closes #136
closes #166
closes #243
closes #254
closes #261
closes #311
closes #700
closes #748
closes #912
closes #1072
closes #1366
fixes #101
fixes #123
fixes #124
fixes #263
fixes #379
fixes #419
fixes #423
fixes #461
fixes #465
fixes #576
fixes #737
fixes #772
fixes #958
fixes #1036
fixes #1142
fixes #1175
fixes #1220
fixes #1223
fixes #1280
fixes #1359
fixes #1368
2017-04-15 23:50:50 +08:00
Alex Lam S.L
2244743545
convert AST_Seq from binary tree to array ( #1460 )
...
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
2017-04-12 21:56:27 +08:00
alexlamsl
0d8597e904
Merge branch 'master' into harmony-v2.8.22
2017-04-09 15:50:38 +08:00
Alex Lam S.L
e869779a98
enable inline_script by default ( #1793 )
2017-04-07 00:45:51 +08:00
Anthony Van de Gejuchte
c20bb99a62
Put expression after extend between parentheses if necessary ( #1780 )
2017-04-04 12:38:13 +08:00
alexlamsl
4614b5b46e
Merge branch 'master' into harmony-v2.8.21
2017-04-02 17:25:20 +08:00
Alex Lam S.L
257ddc3bdb
improve compression of undefined, NaN & Infinitiy ( #1748 )
...
- migrate transformation logic from `OutputStream` to `Compressor`
- always turn `undefined` into `void 0` (unless `unsafe`)
- always keep `NaN` except when avoiding local variable redefinition
- introduce `keep_infinity` to suppress `1/0` transform, except when avoiding local variable redefinition
supersedes #1723
fixes #1730
2017-04-01 03:02:14 +08:00
Ondřej Španěl
2f93058c6e
More variants of import added ( #1738 )
...
- `import * from "x.js"`
- `import * as Name from "x.js"`
2017-03-31 17:52:56 +08:00
Alex Lam S.L
a0c3836ba0
sort options in alphabetical order ( #1743 )
...
They started off as functional groups I guess, but given the sheer number of options this is becoming too difficult to read.
2017-03-31 16:41:04 +08:00
Alex Lam S.L
11e9bdc427
fix missing preamble when shebang is absent ( #1742 )
2017-03-31 15:26:57 +08:00