Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Unified Diff: pkg/compiler/lib/src/js/template.dart

Issue 839323003: Implementation of async-await transformation on js ast. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Implement new ssa-nodes in ssa-tracer. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js/template.dart
diff --git a/pkg/compiler/lib/src/js/template.dart b/pkg/compiler/lib/src/js/template.dart
index ce57d09b8c7e2fe223d96c6d8cfcfc25f028c828..d080613228f9851ff2f7012beff1f50f3f053b9b 100644
--- a/pkg/compiler/lib/src/js/template.dart
+++ b/pkg/compiler/lib/src/js/template.dart
@@ -435,6 +435,11 @@ class InstantiatorGeneratorVisitor implements NodeVisitor<Instantiator> {
return (arguments) => new Return(makeExpression(arguments));
}
+ Instantiator visitYield(Yield node) {
+ Instantiator makeExpression = visit(node.expression);
+ return (arguments) => new Yield(makeExpression(arguments), node.hasStar);
+ }
+
Instantiator visitThrow(Throw node) {
Instantiator makeExpression = visit(node.expression);
return (arguments) => new Throw(makeExpression(arguments));
@@ -487,8 +492,11 @@ class InstantiatorGeneratorVisitor implements NodeVisitor<Instantiator> {
new FunctionDeclaration(makeName(arguments), makeFunction(arguments));
}
- Instantiator visitLabeledStatement(LabeledStatement node) =>
- TODO('visitLabeledStatement');
+ Instantiator visitLabeledStatement(LabeledStatement node) {
+ Instantiator makeBody = visit(node.body);
+ return (arguments) => new LabeledStatement(node.label, makeBody(arguments));
+ }
+
Instantiator visitLiteralStatement(LiteralStatement node) =>
TODO('visitLiteralStatement');
Instantiator visitBlob(Blob node) =>

Powered by Google App Engine
This is Rietveld 408576698