136 Commits

Author SHA1 Message Date
Sebastian McKenzie
de6b608dda add _declarations and _scopeInfo to t.inherits 2015-02-08 20:23:21 +11:00
Sebastian McKenzie
9afa3f6b58 add opts param to t.isReferencedIdentifier 2015-02-08 09:31:41 +11:00
Sebastian McKenzie
eb1ae70bfa Merge pull request #701 from RReverser/master
Add tail recursion optimization.
2015-02-07 23:37:43 +11:00
Sebastian McKenzie
e06aac4783 Revert "make export { foo as default }; trigger common interop"
This reverts commit 07c7b5b419a99802e2949b72c5cbf6ee4010929a.
2015-02-07 19:40:49 +11:00
Sebastian McKenzie
07c7b5b419 make export { foo as default }; trigger common interop 2015-02-07 19:29:59 +11:00
Sebastian McKenzie
a051a47048 reorder types requires 2015-02-07 08:11:42 +11:00
Ingvar Stepanyan
5b2216b348 Add tail recursion optimization.
As per ES6, VMs should perform tail call optimization and prevent growth of call stack.
This adds tail call optimization for recursion case (when function has explicit name and calls itself in `return`).
Cross-function optimization is not currently performed as it's more complicated and requires value tracking.
2015-02-06 16:34:35 +02:00
Sebastian McKenzie
7d950cd60a i made the javascripts faster with a transformer prepass to check what transformers actually have to be ran 2015-02-04 12:56:34 +11:00
Sebastian McKenzie
c35f041091 simplify to.isFalsyExpression method 2015-02-04 08:25:40 +11:00
Sebastian McKenzie
239369314c more scope refactoring - fixes #676 2015-02-03 20:06:27 +11:00
Sebastian McKenzie
630f1717f0 clean up scope collision tracking and constants transformer - fixes #331 2015-02-03 13:20:52 +11:00
Sebastian McKenzie
b2ad79cf88 rename t.getDeclarations to the WAY more reflective t.getBindingIdentifiers 2015-02-03 12:03:21 +11:00
Sebastian McKenzie
0b33a62032 fix linting errors 2015-02-02 10:48:18 +11:00
Sebastian McKenzie
18b836c16a add allowPartial option to t.buildMatchMemberExpression, fix t.isReferenced on Property nodes - fixes #656 2015-02-02 10:44:56 +11:00
Sebastian McKenzie
9fe1e37ca7 fix t.buildMatchMemberExpression 2015-02-02 01:41:39 +11:00
Sebastian McKenzie
8a9aac3e68 fix linting errors 2015-02-02 01:37:27 +11:00
Sebastian McKenzie
27138abd29 simplify member expression checking, flesh out react component optimiser #653 2015-02-02 01:30:06 +11:00
Sebastian McKenzie
456b2d3910 remove unused keys declaration in types 2015-01-31 10:12:32 +11:00
Sebastian McKenzie
f5ccb9c0ba clean up types, add missing jsdoc parameters, add some descriptions 2015-01-30 21:48:32 +11:00
Sebastian McKenzie
055dd5d2c3 simplify t.getDeclarations keys 2015-01-30 21:42:24 +11:00
Sebastian McKenzie
0fea437536 rename t.getIds to t.getDeclarations and remove dead code 2015-01-30 21:36:51 +11:00
Stefan Penner
9ddf411f2c cleanup: require explicit lodash modules needed 2015-01-28 23:52:17 -05:00
Sebastian McKenzie
962eeed252 clean up t.getIds 2015-01-28 23:41:42 +11:00
Sebastian McKenzie
3d98364adb in types.getIds make sure the declaration inside of ExportDeclaration is actually a Declaration, clean up types.isReferenced - fixes #614 2015-01-28 23:12:53 +11:00
Sebastian McKenzie
3affa543ef add yes/no comments to describe what we're actually testing for in types.isReferenced 2015-01-28 20:21:25 +11:00
Sebastian McKenzie
2a47afebde more accurate types.isReferenced comment 2015-01-28 20:09:37 +11:00
Sebastian McKenzie
968db67d0a add in pattern support to t.isReferenced 2015-01-28 20:06:49 +11:00
Sebastian McKenzie
b22ef22e36 add missing semicolon 2015-01-28 20:03:29 +11:00
Sebastian McKenzie
69f2a0d3f1 better t.toIdentifier behaviour that doesn't camelcase on underscores - fixes #610 2015-01-28 20:01:55 +11:00
Sebastian McKenzie
4b66dcb738 more reliable t.isReferenced - fixes #610 2015-01-28 19:58:20 +11:00
Sebastian McKenzie
5477a990bc construct null object for types.getIds 2015-01-28 18:09:38 +11:00
Sebastian McKenzie
3db7811f00 add missing use strict declarations 2015-01-26 15:53:24 +11:00
Sebastian McKenzie
8243a34b69 change the way modules handle default exports and function declaration exports 2015-01-26 15:53:17 +11:00
Sebastian McKenzie
cfd0059fc7 fix linting errors 2015-01-26 13:51:06 +11:00
Sebastian McKenzie
2808bc2c90 add in custom acorn node constructor 2015-01-26 01:32:37 +11:00
Sebastian McKenzie
8a13c12738 switch rest and default parameters to new ast type 2015-01-24 16:31:43 +11:00
Sebastian McKenzie
3167d66154 add t.getLastStatements and File::isConsequenceExpressionStatement 2015-01-24 00:04:20 +11:00
Sebastian McKenzie
a22cd72440 update to RestElement - @RReverser 2015-01-23 23:20:45 +11:00
Sebastian McKenzie
e1d2def4b1 add t.getSpecifierId that handles default specifiers 2015-01-23 23:03:04 +11:00
Sebastian McKenzie
36fa887be8 update XJS namespaces to JSX 2015-01-23 08:08:56 +11:00
Sebastian McKenzie
8f68f62f8a add jscs 2015-01-22 19:23:56 +11:00
Sebastian McKenzie
d911bdaf63 add AssignmentPattern support to scope tracking - fixes #537 2015-01-20 08:56:14 +11:00
Sebastian McKenzie
da16bf1e42 add t.isReferencedIdentifier 2015-01-20 00:17:11 +11:00
Sebastian McKenzie
36a933a004 add strict mode to every file 2015-01-18 18:44:08 +11:00
Sebastian McKenzie
774cb66d9b add isBlockedScoped types helper 2015-01-18 18:23:37 +11:00
Sebastian McKenzie
621e66e9ac add private declaration and comprehension expression support to scope tracking and id building 2015-01-18 02:35:08 +11:00
Sebastian McKenzie
3eb4d5b466 fix up styling of #518 2015-01-17 18:53:40 +11:00
Dan Abramov
f9480b5280 Avoid closures when traversing 2015-01-17 00:13:39 +03:00
Dan Abramov
938026abeb Use toFastProperties to speed up t.* method access 2015-01-17 00:13:38 +03:00
Sebastian McKenzie
20e97f2d9b add flow type visitor keys - none currently as we don't need to traverse over any of them - closes #513 2015-01-16 22:46:09 +11:00