kzc
7bcb442e4c
fix destructuring bugs in mangle and compress ( #1992 )
...
- destructuring mangle
- destructuring array default values
fixes #1335
2017-05-23 02:53:01 +08:00
kzc
a658cd84a5
fix destructuring of non string keys ( #1989 )
2017-05-22 16:38:03 +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
02b14528fa
Merge branch 'master' into harmony-v3.0.9
2017-05-19 09:51:00 +08:00
Alex Lam S.L
eae26756f1
introduce unsafe_regexp ( #1970 )
...
fixes #1964
2017-05-19 09:06:29 +08:00
Alex Lam S.L
3db2001633
suppress unused on block variables ( #1969 )
...
fixes #1968
2017-05-19 00:28:19 +08:00
alexlamsl
5f29fced0a
Merge branch 'master' into harmony-v3.0.8
2017-05-18 14:54:18 +08:00
Alex Lam S.L
efcf167e5e
make expect_stdout node version specific ( #1963 )
...
... via semver string on `node_version` label.
2017-05-18 11:28:35 +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
kzc
ebb469e4cd
fix class extends expression ( #1956 )
2017-05-17 03:29:25 +08:00
kzc
c22d26b483
support export default of anonymous functions and classes ( #1954 )
2017-05-17 03:28:24 +08:00
alexlamsl
99fb3e8f0d
Merge branch 'master' into harmony-v3.0.6
2017-05-16 06:48:23 +08:00
Alex Lam S.L
9464d3c20f
fix parsing of property access after new line ( #1944 )
...
Account for comments when detecting property access in `tokenizer`.
fixes #1943
2017-05-16 05:40:49 +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
kzc
4d8f289eb0
fix export default expression; ( #1932 )
2017-05-13 12:56:46 +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
ac73c5d421
avoid arguments and eval in reduce_vars ( #1924 )
...
fixes #1922
2017-05-12 12:34:55 +08:00
alexlamsl
daf44f2b21
Merge branch 'master' into harmony-v3.0.4
2017-05-12 05:13:11 +08:00
Alex Lam S.L
1d407e761e
fix invalid transform on const ( #1919 )
...
- preserve (re)assignment to `const` for runtime error
- suppress `cascade` on `const`, as runtime behaviour is ill-defined
2017-05-12 04:51:44 +08:00
Gyusun Yeom
fcd90db30d
fix safari syntax error - declare twice ( #1851 )
...
To avoid Safari bug, scope of for loop should enclose parent scope variables.
fixes #1753
2017-05-11 16:48:43 +08:00
alexlamsl
fb50b7b627
Merge branch 'master' into harmony-v3.0.3
2017-05-10 11:52:59 +08:00
kzc
9d59c693c2
fix for-of loop with const iterator ( #1899 )
2017-05-10 11:36:03 +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
2944e3df7d
fix collapse_vars on destructuring declarations ( #1889 )
...
fixes #1886
2017-05-09 17:44:28 +08:00
Alex Lam S.L
c14e280585
print error stack in CLI ( #1890 )
2017-05-09 16:36:44 +08:00
Alex Lam S.L
8c7c107765
update minify() usage in test/ufuzz.js ( #1888 )
...
fixes #1887
2017-05-09 15:58:46 +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
Alex Lam S.L
da295de82b
support dumping AST ( #1879 )
...
Re-order `AST_Binary` properties to make dump more readable.
closes #769
2017-05-08 06:23:01 +08:00
Alex Lam S.L
4f8ca4626e
deprecate low level API ( #1877 )
...
fixes #1872
2017-05-08 03:24:42 +08:00
alexlamsl
b4c18f6b83
Merge branch 'master' into harmony-v3.0.0
2017-05-07 15:34:16 +08:00
Alex Lam S.L
98cf95e5b5
fix test for #1865 ( #1873 )
2017-05-07 02:56:02 +08:00
Alex Lam S.L
2c7ee956fd
fix unsafe on evaluate of reduce_vars ( #1870 )
...
Determine if variables with non-constant values can escape and be modified.
fixes #1865
2017-05-06 23:18:55 +08:00
Alex Lam S.L
dee5a27516
enhance collapse_vars ( #1862 )
...
- extend expression types
- `a++`
- `a=x;`
- extend scan range
- `for(init;;);`
- `switch(expr){case expr:}`
- `a = x; a = a || y;`
- terminate upon `debugger;`
closes #1821
fixes #27
fixes #315
fixes #1858
2017-05-06 16:15:43 +08:00
Alex Lam S.L
bffdc8dca8
update test/benchmark.js resources ( #1864 )
2017-05-02 19:48:12 +08:00
kzc
ea9289771b
improve literal return optimization ( #1860 )
2017-05-02 00:10:11 +08:00
Alex Lam S.L
2cb55b2ad0
enforce toplevel on other compress options ( #1855 )
...
Respect "funcs" and "vars" properly.
fixes #1850
2017-04-30 22:52:36 +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
76d19b60ad
fix fuzzer on this ( #1842 )
...
- forbid redeclaration of `this`
- suppress probability for `this` within nested functions
2017-04-24 03:15:03 +08:00
Alex Lam S.L
9e62628171
fix unused on for-in statements ( #1843 )
...
Only need to avoid `var` within the initialisation block.
fixes #1841
2017-04-24 03:14:01 +08:00