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

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

Issue 1185633003: cps-ir: Support foreign code. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update test expectations. Created 5 years, 6 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/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 8b2b173d448ed519d167aa6752d618dbc29fc4c2..4e6c64f497486cfa87f0870e3726cd65926a4bff 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -377,6 +377,16 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
String args = node.arguments.map(formatReference).join(', ');
return 'ApplyBuiltinOperator $operator ($args)';
}
+
+ @override
+ visitForeignCode(cps_ir.ForeignCode node) {
+ String id = names.name(node);
+ String arguments = node.arguments.map(formatReference).join(', ');
+ String continuation = node.continuation == null ? ''
+ : ' ${formatReference(node.continuation)}';
+ printStmt(id, "ForeignCode ${node.type} ${node.codeTemplate} $arguments"
+ "$continuation");
+ }
}
/**
@@ -563,64 +573,91 @@ class BlockCollector implements cps_ir.Visitor {
visitLiteralList(cps_ir.LiteralList node) {
unexpectedNode(node);
}
+
visitLiteralMap(cps_ir.LiteralMap node) {
unexpectedNode(node);
}
+
visitConstant(cps_ir.Constant node) {
unexpectedNode(node);
}
+
visitCreateFunction(cps_ir.CreateFunction node) {
unexpectedNode(node);
}
+
visitGetMutableVariable(cps_ir.GetMutableVariable node) {
unexpectedNode(node);
}
+
visitParameter(cps_ir.Parameter node) {
unexpectedNode(node);
}
+
visitMutableVariable(cps_ir.MutableVariable node) {
unexpectedNode(node);
}
+
visitGetField(cps_ir.GetField node) {
unexpectedNode(node);
}
+
visitGetStatic(cps_ir.GetStatic node) {
unexpectedNode(node);
}
+
visitCreateBox(cps_ir.CreateBox node) {
unexpectedNode(node);
}
+
visitCreateInstance(cps_ir.CreateInstance node) {
unexpectedNode(node);
}
+
visitIsTrue(cps_ir.IsTrue node) {
unexpectedNode(node);
}
+
visitIdentical(cps_ir.Identical node) {
unexpectedNode(node);
}
+
visitInterceptor(cps_ir.Interceptor node) {
unexpectedNode(node);
}
+
visitReadTypeVariable(cps_ir.ReadTypeVariable node) {
unexpectedNode(node);
}
+
visitReifyRuntimeType(cps_ir.ReifyRuntimeType node) {
unexpectedNode(node);
}
+
visitTypeExpression(cps_ir.TypeExpression node) {
unexpectedNode(node);
}
+
visitNonTailThrow(cps_ir.NonTailThrow node) {
unexpectedNode(node);
}
+
visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
unexpectedNode(node);
}
+
visitTypeTest(cps_ir.TypeTest node) {
unexpectedNode(node);
}
+
visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
unexpectedNode(node);
}
+
+ @override
+ visitForeignCode(cps_ir.ForeignCode node) {
+ if (node.continuation != null) {
+ addEdgeToContinuation(node.continuation);
+ }
+ }
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698