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
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
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
698705a820
Don't convert all strings to directives from moz-ast
2016-07-03 12:36:57 +02:00
kzc
335b72df03
Fix spidermonkey AST (ESTree) export and import, Array holes
...
Fixes : #1156 #1161
Also add test to exercise Uglify after spidermonkey export/import of itself.
2016-06-30 21:44:12 +02:00
Mihai Bazon
08623aa6a7
Fix output for "use asm" code from SpiderMonkey AST
...
(will only work properly if the SM tree contains "raw" properties for
Literal number nodes)
2015-11-12 12:18:25 +02:00
kzc
7dbe961b2d
simplify mozilla AST RegExpLiteral token parse and handle corner cases of regex.pattern better
2015-11-02 13:10:37 -05:00
kzc
94c4daaf9e
Have mozilla AST RegExpLiteral parser use regex.pattern and regex.flags rather than non-standard raw property.
2015-11-02 12:24:09 -05:00
kzc
37ee9de902
rename To_Moz_Literal to To_Moz_RegExp
2015-11-01 10:20:42 -05:00
kzc
83db98ad3b
Fixed RegExp literal in mozilla AST generation/output and added a --dump-spidermonkey-ast flag
2015-11-01 01:02:52 -04:00
Mihai Bazon
6637c267a5
Fix mozilla-ast after module loading changes
...
Need to explicitly qualify stuff now, since it's not evaluated in some
global scope.
Ref #636
2015-09-24 18:13:21 +03:00
Ingvar Stepanyan
f16033aafd
Location fix for Mozilla AST start token.
2015-01-06 11:32:41 +01:00
Ingvar Stepanyan
ae5366a31d
Track ending lines/columns; fix end locations in Mozilla AST.
2015-01-06 11:32:41 +01:00
Ingvar Stepanyan
b467a3c877
Added generative testing for AST conversions.
2014-08-03 20:48:59 +03:00
Ingvar Stepanyan
5e314bf3e9
SpiderMonkey Identifier nodes should contain mangled names.
2014-08-03 01:28:58 +03:00
Ingvar Stepanyan
05ba26c7c8
Small fixes for AST conversion.
2014-08-02 13:18:27 +03:00
Ingvar Stepanyan
87b72364a4
Fixes and improvements for UglifyJS->SM AST conversion.
...
* Explicitly forbidden multiple catch clauses as SM-specific feature.
* Simplified describing of UglifyJS->Mozilla AST conversion rules.
* Moved alias rules to single place.
* Removed usage of dynamic type bindings in generated code (speed-up).
2014-08-01 23:45:37 +03:00
Ingvar Stepanyan
0e3ff1f970
Improved UglifyJS<->SpiderMonkey AST conversions.
...
* Added directives recognition in SM AST.
* Moved semi-standard SM `Property` type to separate handler.
* Added `const` recognition from SM AST.
* Removed redundant `this`-as-identifier recognition.
* Removed redundant rules for abstract SM types.
* Described `CatchClause` using string syntax.
* Added support for semi-standard `range` tuple as location source.
* Added back-conversion support (to be improved).
2014-08-01 23:42:34 +03:00
Conrad Irwin
514936beb8
Handle TryStatements trees from acorn >=0.2.0
2014-03-06 17:07:49 -08:00
Mihai Bazon
9794ebf88c
Workaround for missing prefix in UnaryExpression generated by Esprima
...
See #193
2013-04-29 15:03:52 +03:00
Mihai Bazon
b51fe0dcc3
fix end tokens in spidermonkey ast import
2012-10-13 11:37:58 +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
455ac5435d
remove unused code
2012-10-05 22:59:05 +03:00
Mihai Bazon
ecd9f21467
fixed import of locations from SpiderMonkey AST
2012-10-05 15:05:06 +03:00
Mihai Bazon
a9b6f9909a
use the appropriate constructor for symbols
2012-10-04 17:28:35 +03:00
Mihai Bazon
f20c251882
moving code around
2012-10-03 21:39:47 +03:00
Mihai Bazon
2bd8a118c2
define AST_Node.from_mozilla_ast(ast)
...
returns an UglifyJS2 AST given a Mozilla AST. Still needs some work to do
(need to create specific nodes like AST_SymbolRef, AST_SymbolLambda
etc. instead of base AST_Symbol, in order for the mangler/compressor to work
properly)
2012-10-03 20:03:17 +03:00