alexlamsl
|
e793f9b159
|
fix export default
- prohibit definition statements
- parse `AST_Defun` properly
- drop only unused class and function names
|
2017-05-26 05:59:33 +08:00 |
|
alexlamsl
|
e5d93f1555
|
fix hoist_funs on export
|
2017-05-26 05:07:28 +08:00 |
|
alexlamsl
|
269df9267c
|
better fix for mangle
|
2017-05-26 04:52:23 +08:00 |
|
alexlamsl
|
9edb72fe01
|
fix unused on export of function
|
2017-05-26 04:38:11 +08:00 |
|
alexlamsl
|
2d45c1ff30
|
improve mangle and tests
|
2017-05-26 04:35:10 +08:00 |
|
alexlamsl
|
2a4482c012
|
fix mangle on export statements
fixes #2001
fixes #2004
|
2017-05-26 03:53:28 +08:00 |
|
Alex Lam S.L
|
02811ce35e
|
fix issues related to export & function (#2002)
- `unused` function names
- confusion with function call syntax
fixes #2001
|
2017-05-26 03:12:52 +08:00 |
|
alexlamsl
|
37e549ff4f
|
Merge branch 'master' into harmony-v3.0.11
|
2017-05-23 22:29:04 +08:00 |
|
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 |
|
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
|
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 |
|
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
|
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 |
|
kzc
|
9d59c693c2
|
fix for-of loop with const iterator (#1899)
|
2017-05-10 11:36:03 +08:00 |
|
Alex Lam S.L
|
2944e3df7d
|
fix collapse_vars on destructuring declarations (#1889)
fixes #1886
|
2017-05-09 17:44:28 +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 |
|
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
|
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 |
|
Alex Lam S.L
|
45ce369480
|
fix AST_For.init patch-up in drop_unused() (#1839)
fixes #1838
|
2017-04-23 01:51:56 +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
|
f05d4f7af3
|
improve unused (#1832)
- extract leading value with side-effects out of `var` statement
- reduce scanning of `AST_Definitions` from 3 passes to just once
|
2017-04-20 13:06:14 +08:00 |
|
Alex Lam S.L
|
88e7a542cd
|
fix unused on labeled for-loop (#1831)
fixes #1830
|
2017-04-20 04:18:38 +08:00 |
|
Alex Lam S.L
|
4dcff038cb
|
improve collapse_vars on AST_Var (#1828)
Perform the same cascaded scanning within `var` statement as we do on array of statements.
|
2017-04-19 04:49:09 +08:00 |
|