83 Commits

Author SHA1 Message Date
Ingvar Stepanyan
0a1724fc3f Remove no more needed returnBlock helper. 2015-02-08 11:31:19 +02:00
Sebastian McKenzie
bcc9e016b1 only evaluate object destructuring pattern once 2015-02-08 20:23:22 +11:00
Sebastian McKenzie
de6b608dda add _declarations and _scopeInfo to t.inherits 2015-02-08 20:23:21 +11:00
Ingvar Stepanyan
9e3c67a8a2 Clean up functionChildrenVisitor a bit. 2015-02-08 10:53:09 +02:00
Ingvar Stepanyan
91362f80b1 Clean up transformations after #714.
Since now we have runtime helper, we don't need
expression -> statement conversions anymore.
2015-02-08 10:40:03 +02:00
Sebastian McKenzie
9161af58c0 fix linting errors 2015-02-08 16:32:08 +11:00
Sebastian McKenzie
e42d5a889e make destructuring in catch clauses block scoped and add support for non-variable destructuring in for-in/of heads 2015-02-08 14:33:55 +11:00
Sebastian McKenzie
4c8e6481b6 make default parameters iife invocation less serious 2015-02-08 09:54:24 +11:00
Sebastian McKenzie
0867df2691 fix ForOf block body not properly inheriting declarations 2015-02-08 09:50:12 +11:00
Sebastian McKenzie
b06f99ab30 add iife detection to non-identifier params in default parameters 2015-02-08 09:37:06 +11:00
Sebastian McKenzie
dabe69856a add additional checks to transformers 2015-02-08 09:31:19 +11:00
Ingvar Stepanyan
4c318166e1 Added complete TCO (tail call optimization).
Works across functions and generates simpler and faster code than #701.
Works even across files when used in conjunction with `runtime` option.

Closes #256.
2015-02-07 22:22:38 +02:00
Sebastian McKenzie
c0af67eca1 add support for super in object literals - fixes #411 2015-02-08 02:01:17 +11:00
Sebastian McKenzie
eb14f1da00 implement optional TDZ - fixes #563 2015-02-08 01:27:22 +11:00
Sebastian McKenzie
8a143bf957 use a template in tail call transformer - @RReverser 2015-02-07 23:52:35 +11:00
Ingvar Stepanyan
b53b41cef3 Provide placeholders for proper function length. 2015-02-07 14:26:03 +02: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
ad60d49611 fix bindingEquals in constants transformer 2015-02-06 23:35:19 +11:00
Sebastian McKenzie
a6d1a5a724 add bindingEquals, typeEquals, referenceEquals helper methods to Scope 2015-02-06 23:07:10 +11:00
Sebastian McKenzie
76ae1682a3 remove context arg in favor of this, rename TraversalIteration to TraversalPath, and remove ast handlers 2015-02-06 01:47:43 +11:00
Sebastian McKenzie
f365cc1248 more internal rearchitecturing 2015-02-05 14:05:15 +11:00
Sebastian McKenzie
4b2cf2e2c5 fix styling errors 2015-02-04 23:24:08 +11:00
Sebastian McKenzie
23b8c72e9a remove unused traverse requires 2015-02-04 23:22:26 +11:00
Sebastian McKenzie
d6b39bc89b HomeObject isn't dynamic - fixes #690 2015-02-04 18:47:58 +11:00
Sebastian McKenzie
37ef976515 more cleanup of the destructuring transformer 2015-02-04 18:21:10 +11:00
Sebastian McKenzie
fa5a3022d4 clean up destructuring transformer 2015-02-04 17:48:27 +11:00
Sebastian McKenzie
58bed088f5 throw an error when destructuring a null or undefined value on an empty object pattern - fixes #681 2015-02-04 17:35:24 +11:00
Sebastian McKenzie
4f023e83f8 refactor traversals that have scopes to use the scope helper method 2015-02-04 13:25:23 +11: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
55f2cffc22 fix linting errors 2015-02-04 10:05:20 +11:00
Sebastian McKenzie
8d81a382f7 inline back the super constructor call helper - fixes #684 2015-02-04 08:39:45 +11:00
Sebastian McKenzie
239369314c more scope refactoring - fixes #676 2015-02-03 20:06:27 +11:00
Sebastian McKenzie
f2d1fc47d1 Merge branch 'master' of github.com:6to5/6to5 2015-02-03 19:55:29 +11:00
Sebastian McKenzie
a9405e5e80 clean up scope API 2015-02-03 19:33:32 +11:00
Jay Phelps
9880990fa7 First pass at converting identifiers/words from en-au -> en-us 2015-02-03 00:08:43 -08:00
Sebastian McKenzie
72de8f5c9b fix class tests to reflect new call behaviour 2015-02-03 15:35:24 +11:00
Sebastian McKenzie
3a11c7d46b as per "ES6 February 2, 2015 Draft Rev 32" "Constructors defined using class definition syntax throw when called as functions" 2015-02-03 15:16:16 +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
e6e93840a6 check for scope collisions in constants transformer - fixes #331 2015-02-03 12:03:38 +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
706797eb47 rename LetScoping to BlockScoping 2015-02-03 10:23:56 +11:00
Sebastian McKenzie
8e23d623c8 split up util.pushMutatorMap and util.buildDefineProperties 2015-02-03 09:30:52 +11:00
Sebastian McKenzie
25566a24f6 block hoist assignment pattern destructuring - fixes #652 2015-02-01 18:33:36 +11:00
Sebastian McKenzie
5aa8ece242 don't run playground transformers at all if playground isn't enabled 2015-02-01 16:19:49 +11:00
Sebastian McKenzie
8c7ba20f86 fix regenerator transformer order - fixes #617 2015-02-01 16:19:35 +11:00
Sebastian McKenzie
4a720625d9 fix linting errors 2015-01-31 21:29:44 +11:00
Sebastian McKenzie
c0299320f0 avoid transforming of inner labels and propagation of maps in block scoping transformer - #644 2015-01-31 21:27:20 +11:00
Sebastian McKenzie
0fea437536 rename t.getIds to t.getDeclarations and remove dead code 2015-01-30 21:36:51 +11:00
Sebastian McKenzie
e514660fbd we no longer have to handle labels on loops in block scoping 2015-01-30 21:26:35 +11:00
Sebastian McKenzie
3f3cd2bb3a add better support for labels in the block scoping transformer and add more let scoping tests - fixes #644 and closes #608 2015-01-30 20:51:20 +11:00