Commit Graph

30 Commits

Author SHA1 Message Date
kzc
100e18305d first cut of async/await (#2098)
- async arrow functions not yet supported


fixes #1789
2017-06-15 06:15:48 +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
kzc
4d8f289eb0 fix export default expression; (#1932) 2017-05-13 12:56:46 +08:00
alexlamsl
b4c18f6b83 Merge branch 'master' into harmony-v3.0.0 2017-05-07 15:34:16 +08:00
Alex Lam S.L
2244743545 convert AST_Seq from binary tree to array (#1460)
- rename `AST_Seq` to `AST_Sequence`
- raise default sequences_limit from 200 to 800
2017-04-12 21:56:27 +08: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
kzc
842ac27efb [ES6] Get compress and global_defs working for AST_Class 2016-07-17 19:56:02 +02:00
Anthony Van de Gejuchte
0af42d1831 Template fixes
* Fixes #1147: template strings not obeying -b ascii_only true
* Allow evaluation of template expressions by adding optimizers and
  walkers
* Make sure tagged templates are never changed
* Remove template tokenizer in parser, add template tokenizer in
  tokenizer. It is using a brace counter to track brace position of
  templates
* Add tokens `template_head` and `template_substitution` but parsing
  tokens stays mostly the same
* Do not output strings anymore in AST_TemplateString, instead use
  AST_TemplateSegment
* Fix parsing tagged templates, allowing multiple templates behind
  as spec allows this

These changes don't influence tagged templates because raw content
may influence code execution, however they are safe to do in normal
templates:
* Allow basic string concatenation of templates where possible
* Allow custom character escape style similar to strings, except in
  tagged templates

Note that expressions are still compressed in tagged templates.

Optional things that may be improved later:
* Custom quote style for templates if it doesn't have expressions.
  Making it obey the quote_style option if this is the case.
2016-07-17 00:36:42 +02:00
Anthony Van de Gejuchte
f9cab7ad61 Allow expand in array literals 2016-06-19 20:49:18 +02:00
Anthony Van de Gejuchte
dcfc514c38 Improve yield support and restrict usage of strict
- Partially reverting 91cdb93e57 and eaf3911c31 and reimplement
- Add generators support for objects and classes
- Only classes can have static methods so restrict use of it

Special thanks to @rvanvelzen and @kzc for reviewing this patch and
providing constructive feedback over and over again.
2016-06-09 22:22:15 +02:00
Richard van Velzen
f94497d1d6 Merge branch 'master' into harmony 2016-04-18 15:50:35 +02:00
Fábio Santos
6d2f77c180 fix #1003 by removing AST_ObjectSymbol and using AST_ObjectKeyVal for the same effect 2016-03-14 13:42:50 +01:00
kzc
f4c2ea37bf Collapse single use var definitions
Fix #721
2016-01-27 11:48:15 +02:00
Richard van Velzen
7f3dbb6df7 Merge branch 'master' into harmony 2015-12-26 17:59:38 +01:00
Mihai Bazon
7691bebea5 Rework has_directive
It's now available during tree walking, i.e. walker.has_directive("use
asm"), rather than as part of the scope.  It's thus no longer necessary
to call `figure_out_scope` before codegen.  Added special bits in the
code generator to overcome the fact that it doesn't inherit from
TreeWalker.

Fix #861
2015-11-11 22:15:25 +02:00
Fábio Santos
7ee8f3512e play nice with propmangle 2015-08-25 17:49:29 +01:00
Fábio Santos
ceebc466b9 prepare AST_Destructuring for the Ents 2015-08-21 12:04:26 +02:00
Fábio Santos
fa5c4f2d03 Adding arrow functions 2015-08-04 00:57:53 +01:00
Mihai Bazon
9243b0cb9d Apply transformer to AST_VarDef's name
Fix #237
2013-07-14 13:24:09 +03:00
Mihai Bazon
f64539fb76 Compress code passed to new Function if it's a constant.
Only for `--unsafe`.

Close #203
2013-05-14 10:47:06 +03:00
Mihai Bazon
089ac908b7 fix #51 2012-11-18 17:37:45 +02:00
Mihai Bazon
8149be551e minor 2012-10-12 14:55:54 +03:00
Mihai Bazon
1b0aab2ce9 added $propdoc to AST nodes and some cleanups
hopefully we can make the AST documentation self-generating
2012-10-09 18:20:39 +03:00
Mihai Bazon
9ead49641d minor AST cleanup (AST_BlockStatement may inherit from AST_Block) 2012-10-09 13:59:17 +03:00
Mihai Bazon
11863d6f9a more cleanup (dropped AST_SwitchBlock) 2012-10-03 15:52:31 +03:00
Mihai Bazon
e1098b04a7 "use strict"; 2012-10-02 12:45:58 +03:00
Mihai Bazon
78be8f5296 compressor successfully moved to TreeTransformer 2012-09-26 14:27:01 +03:00
Mihai Bazon
a24e7ee976 checkpoint (refactoring, WIP) 2012-09-26 12:16:16 +03:00
Mihai Bazon
a83b28503f properly drop mutually-referring declarations that are not otherwise
referenced and have no side effects
2012-09-23 12:47:34 +03:00
Mihai Bazon
76d88b59dc tree transformer api (WIP) 2012-09-22 19:41:09 +03:00