alexlamsl
e77b6d525c
Merge branch 'master' into harmony-v3.0.23
2017-07-02 17:47:21 +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
alexlamsl
ed3032e52a
Merge branch 'master' into harmony-v3.0.22
2017-06-30 11:24:07 +08:00
Alex Lam S.L
bdeadffbf5
improve usability of name cache under minify() ( #2176 )
...
fixes #2174
2017-06-29 12:48:34 +08:00
alexlamsl
087bce508a
Merge branch 'master' into harmony-v3.0.21
2017-06-29 00:58:28 +08:00
Alex Lam S.L
d052394621
fix line terminators in template literals ( #2173 )
...
fixes #2172
2017-06-28 22:52:29 +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
alexlamsl
11afa816e3
Merge branch 'master' into harmony-v3.0.20
2017-06-25 16:43:44 +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
dc6bcaa18e
synchronise mangle.properties for minify() & test/compress ( #2151 )
2017-06-23 15:53:13 +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
71556d00b5
correctly parse export of function & class ( #2135 )
2017-06-21 23:15:39 +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
alexlamsl
78cf35f89c
Merge branch 'master' into harmony-v3.0.17
2017-06-15 19:01:36 +08:00
Alex Lam S.L
43697958f3
avoid intermittent test time-out failures ( #2100 )
2017-06-15 04:47:57 +08:00
alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +08:00
Alex Lam S.L
41beae4dd7
cache web assets between CI runs ( #2089 )
...
- skip `test/jetstream.js` for `node@0.12 `
2017-06-14 11:53:10 +08:00
Ziad El Khoury Hanna
82db9188ac
fix CLI parsing of --source-map content ( #2088 )
...
fixes #2082
2017-06-13 16:30:46 +08:00
Alex Lam S.L
3dc9e140e4
add Node.js 8 to Travis CI ( #2086 )
...
- explicitly terminate `test/jetstream.js` upon completion
- log verbose output from `test/benchmark.js` & `test/jetstream.js`
- remove obsolete workaround for Travis CI
2017-06-13 06:21:16 +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
f2af093402
fix CLI output corruption ( #2061 )
...
Using `console.error()` & `console.log()` result in inconsistent formatting across Node.js versions.
Avoid this issue by directly writing to `process.stderr` & `process.stdout` instead.
Miscellaneous
- prettify invalid option listing
2017-06-07 04:25:32 +08:00
Alex Lam S.L
b0eab71470
implement test/jetstream.js --debug ( #2058 )
2017-06-06 19:28:12 +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
alexlamsl
520da57fdc
Merge branch 'master' into harmony-v3.0.13
2017-05-29 10:58:05 +08:00
Alex Lam S.L
fec14379f6
improve CLI usability ( #2016 )
...
Report supported options upon invalid option syntax.
fixes #1883
2017-05-28 04:09:40 +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
Alex Lam S.L
efdb65913b
improve usability of global_defs in minify() ( #1987 )
...
Use `@key` to `parse()` string value as `AST_Node`.
fixes #1986
2017-05-22 01:38:43 +08:00
alexlamsl
a3053c537a
Merge branch 'master' into harmony-v3.0.10
2017-05-21 01:36:38 +08:00
Alex Lam S.L
58fae7dc07
enhance if_return to handle return void... ( #1977 )
...
fixes #512
2017-05-20 15:58:46 +08:00
Alex Lam S.L
a2172e1a99
fix parsing of yield as object key ( #1976 )
...
fixes #1974
2017-05-20 13:11:37 +08:00
alexlamsl
99fb3e8f0d
Merge branch 'master' into harmony-v3.0.6
2017-05-16 06:48:23 +08:00
Alex Lam S.L
265008c948
improve keyword-related parser errors ( #1941 )
...
fixes #1937
2017-05-15 23:02:55 +08:00
alexlamsl
81243c4e71
Merge branch 'master' into harmony-v3.0.5
2017-05-15 18:58:54 +08:00
alexlamsl
cd6e849555
Revert "remove support for const ( #1910 )"
...
This reverts commit c391576d52 .
2017-05-15 18:38:16 +08:00
Alex Lam S.L
e005099fb1
fix & improve coverage of estree ( #1935 )
...
- fix `estree` conversion of getter/setter
- fix non-directive literal in `to_mozilla_ast()`
- revamp `test/mozilla-ast.js`
- reuse `test/ufuzz.js` for code generation
- use `acorn.parse()` for creating `estree`
- extend `test/ufuzz.js` for `acorn` workaround
- catch variable redefinition
- non-trivial literal as directive
- adjust options for tolerance
Miscellaneous
- optional semi-colon when parsing directives
fixes #1914
closes #1915
2017-05-15 02:37:53 +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
c391576d52
remove support for const ( #1910 )
...
As this is not part of ES5.
2017-05-12 14:57:41 +08:00
alexlamsl
fb50b7b627
Merge branch 'master' into harmony-v3.0.3
2017-05-10 11:52:59 +08:00
Alex Lam S.L
41996be86f
extend test timeout
...
Travis has gone a lot slower recently, and most test failures are due to time-out on this particular test.
2017-05-10 02:43:12 +08:00
alexlamsl
222100ea4c
Merge branch 'master' into harmony-v3.0.2
2017-05-10 01:57:32 +08:00
Alex Lam S.L
c14e280585
print error stack in CLI ( #1890 )
2017-05-09 16:36:44 +08:00
alexlamsl
81f1311b24
Merge branch 'master' into harmony-v3.0.1
2017-05-09 02:10:06 +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
Alex Lam S.L
a3b2eb75bd
return Error from minify() ( #1880 )
...
Have `minify()` return `Error` in `result.error` rather than throwing it.
2017-05-08 07:05:19 +08:00