Alex Lam S.L
87bae623e9
simplify computed properties for methods, getters & setters ( #2555 )
...
fixes #2554
2017-12-04 00:18:48 +08:00
kzc
f496ac5c85
implement compress option computed_props ( #2361 )
...
transforms `{["computed"]: 1}` into `{computed: 1}`
2017-10-16 11:35:04 +08:00
kzc
e8235657e4
add new compress option unsafe_methods for ecma >= 6 ( #2325 )
...
fixes #2321
2017-09-20 00:15:54 +08:00
alexlamsl
69cb459c16
fix-ups for #2258
2017-07-30 04:26:21 +08:00
Alex Lam S.L
f5c46db738
improve AST_ConciseMethod compression ( #2202 )
...
p(){return x;} ---> p:()=>x
Optimization subject to the `compress` option `arrows`.
2017-07-06 01:21:04 +08:00
kzc
fdbb1d09ef
Convert p: function(){} to p(){} in object literals ( #2199 )
...
when `compress` option `ecma` is 6 or greater.
2017-07-04 14:35:58 +08:00
alexlamsl
11afa816e3
Merge branch 'master' into harmony-v3.0.20
2017-06-25 16:43:44 +08:00
alexlamsl
75c3c8963f
Merge branch 'master' into harmony-v2.8.13
2017-03-18 02:52:45 +08:00
Anthony Van de Gejuchte
07734b000a
Destructuring consistency fixes ( #1417 )
...
- Use AST_Destructuring for lhf assignment patterns
- Use AST_DefaultAssign for default assignments
- Add more checks for lhs expressions
- Add lots of testing
- Cleanup ast (e.g. remove default property)
- Fix #1402 based on a patch from @kzc
- Refine spread allowance in array destructring pattern
- Add destructuring AST tree checker
2017-02-24 08:49:19 +08:00
Anthony Van de Gejuchte
c2112d5886
Fix case where a lonely var is used as computed property
2016-11-29 20:19:01 +01:00
Anthony Van de Gejuchte
32c2cc33bb
Improve binding patterns for arrow functions
2016-10-23 21:13:12 +02:00
Anthony Van de Gejuchte
1c15d0db45
Fix quoting of properties
...
- Make AST_ConciseMethod child of AST_ObjectProperty.
- Fix some typos.
2016-08-26 15:06:24 +02:00
Anthony Van de Gejuchte
110a1ac885
Make distinction between * method and * operator
...
Also add quotes to properties when necessary,
this might be the case if the name isn't a valid
identifier
2016-07-29 21:31:08 +02:00
Anthony Van de Gejuchte
3f8fc3a316
Fix computed getters + cleanup AST
2016-07-21 18:21:46 +02:00
Anthony Van de Gejuchte
72a9d799b6
Various property fixes
...
* Implement getter/setter with computed value
* Fix parsing getter/setter after static or generator token
* Allow storing expressions for computed expression in AST_SymbolMethod
* Allow get and set in shorthand properties in object literals
Fixes #1094 , #1146 and #1221
2016-07-21 16:50:32 +02:00