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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 1405503003: dart2js cps: Some fixes for yield. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
index 2b3c95d7cb8205b95bc3d58e82b31de306c4ae24..1b4d2f4a755681ec62b1455c564c23dfefbe19ff 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -238,6 +238,21 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
printStmt(dummy, "Branch $condition ($trueCont, $falseCont) $strict");
}
+ visitAwait(cps_ir.Await node) {
+ String dummy = names.name(node);
+ String value = formatReference(node.input);
+ String continuation = formatReference(node.continuation);
+ printStmt(dummy, 'Await $value $continuation');
+ }
+
+ visitYield(cps_ir.Yield node) {
+ String dummy = names.name(node);
+ String name = node.hasStar ? 'YieldStar' : 'Yield';
+ String value = formatReference(node.input);
+ String continuation = formatReference(node.continuation);
+ printStmt(dummy, '$name $value $continuation');
+ }
+
visitSetMutable(cps_ir.SetMutable node) {
String variable = names.name(node.variable.definition);
String value = formatReference(node.value);
@@ -398,20 +413,6 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
}
@override
- visitAwait(cps_ir.Await node) {
- String value = formatReference(node.input);
- String continuation = formatReference(node.continuation);
- return 'Await $value $continuation';
- }
-
- @override
- visitYield(cps_ir.Yield node) {
- String value = formatReference(node.input);
- String continuation = formatReference(node.continuation);
- return 'Yield $value $continuation';
- }
-
- @override
visitRefinement(cps_ir.Refinement node) {
String value = formatReference(node.value);
return 'Refinement $value ${node.type}';
« no previous file with comments | « no previous file | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698