alexlamsl
8af362ed57
Merge branch 'master' into harmony-v3.0.16
2017-06-14 17:09:30 +08:00
Alex Lam S.L
68138f2281
fix reduce_vars on AST_Arrow ( #2091 )
...
fixes #2090
2017-06-14 16:40:37 +08:00
Alex Lam S.L
2bdc8802dd
fix variable accounting in inline ( #2085 )
...
fixes #2084
2017-06-13 01:40:14 +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
9db0695b10
fix cascade on multi-branch evaluations ( #2067 )
...
Partially reverts #2059 as this has better coverage and performance.
fixes #2062
2017-06-07 19:52:01 +08:00
Alex Lam S.L
a7971f4e34
fix unused crash with top-level AST_Var ( #2066 )
...
fixes #2063
2017-06-07 19:12:35 +08:00
Alex Lam S.L
b9ad53d1ab
fix inline handling of AST_Call.args ( #2059 )
2017-06-06 22:55:25 +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
Alex Lam S.L
540220b91b
fix AST_Function scope invariance ( #2052 )
...
improve function name hack in `run_code()`
2017-06-04 19:27:43 +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
kzc
753932b302
drop unused arrow functions ( #2050 )
2017-06-04 00:20:46 +08:00
Alex Lam S.L
1743621889
clean up lib/parse.js ( #2047 )
...
- remove unused definitions
- replace `array_to_hash()`
2017-06-03 14:00:59 +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
Alex Lam S.L
ec095ed647
whitelist unsafe evaluate candidates ( #2039 )
...
- all arguments may accept constant values
- return constant value
- free of side effects
- available & identical across locales and runtime environments
2017-06-01 04:33:05 +08:00
Alex Lam S.L
17e73121fa
enhance unsafe evaluate ( #2037 )
2017-06-01 00:56:28 +08:00
alexlamsl
c814060b4a
Merge branch 'master' into harmony-v3.0.14
2017-05-31 11:42:54 +08:00
Alex Lam S.L
e9645e017f
introduce unsafe_Func ( #2033 )
...
Separate flag for #203 functionality.
2017-05-31 03:38:00 +08:00
Alex Lam S.L
303293e4aa
fix side_effects on AST_Class ( #2031 )
...
fixes #2028
2017-05-31 01:44:29 +08:00
Alex Lam S.L
23265ac253
mangle destructuring function parameters ( #2029 )
...
fixes #2025
2017-05-30 23:41:55 +08:00
Alex Lam S.L
0cc6dedccc
fix block elimination ( #2023 )
...
fixes #1664
fixes #1672
2017-05-30 14:59:54 +08:00
kzc
ec63588496
fix compress of IIFE with destructuring args ( #2022 )
2017-05-30 13:17:06 +08:00
Alex Lam S.L
c2e471e3ad
fix if_return on block-scoped variables ( #2021 )
...
fixes #1317
2017-05-29 18:08:08 +08:00
alexlamsl
520da57fdc
Merge branch 'master' into harmony-v3.0.13
2017-05-29 10:58:05 +08:00
Alex Lam S.L
1aa38051fb
better fix for #512 & #2010 ( #2019 )
...
- remove duplicated functionalities
- fix similar issue with `else`
2017-05-29 10:51:41 +08:00
Alex Lam S.L
c6c9f4f5a8
implement --help options ( #2017 )
2017-05-28 18:21:44 +08:00
alexlamsl
94d2aeee89
fix block-scoped function for ES6
...
fixes #1903
2017-05-27 19:28:07 +08:00
alexlamsl
aa835eb0f6
Merge branch 'master' into harmony-v3.0.12
2017-05-27 18:12:10 +08:00
Alex Lam S.L
7b13159cda
fix hoist_funs on block-scoped function under "use strict" ( #2013 )
...
Technically not part of ES5, but commonly used code exists in the wild.
2017-05-27 17:44:59 +08:00
Alex Lam S.L
95094b9c22
fix if_return on AST_Defun ( #2010 )
...
Previous fiix for #1052 perturbs declaration order of functions which leads to incorrect behaviour under "use strict".
2017-05-27 13:41:49 +08:00
Alex Lam S.L
dc33facfcb
fix dead_code on block-scoped function under "use strict" ( #2006 )
...
Technically not part of ES5, but commonly used code exists in the wild.
2017-05-26 16:08:51 +08:00
Alex Lam S.L
39d4d7e20a
fix export related issues ( #2005 )
...
- `mangle` non-exported names
- `unused` on `export` of `function`
- `hoist_funs` on `export`
- `export default`
- prohibit definition statements
- parse `AST_Defun` properly
- drop only unused class and function names
fixes #2001
fixes #2004
2017-05-26 13:35:40 +08:00
Alex Lam S.L
c70fb60384
clean up lib/scope.js ( #2003 )
...
fixes #2004
2017-05-26 03:58:35 +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
Alex Lam S.L
793d61499b
report timing breakdown ( #2000 )
...
fix corner cases with `sourceMap`
fixes #1998
2017-05-25 07:15:55 +08:00
Alex Lam S.L
c988e5f4d6
remove AST_ArrowParametersOrSeq ( #1997 )
2017-05-24 17:45:18 +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
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