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

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

Issue 1616673002: dart2js cps: Debugging utility and fix idempotency in shrinking reducer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Do not run the same Pass instance twice Created 4 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/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 d7ff3cc1c90749f3af74274e6959da36d6a8506f..e07e2b8a92aa8440437de1bbac98d5bb8381669a 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart
@@ -29,7 +29,7 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
builder.visit(node);
for (Block block in builder.entries) {
- printBlock(block, entryPointParameters: node.parameters);
+ printBlock(block, entryPoint: node);
}
for (Block block in builder.cont2block.values) {
printBlock(block);
@@ -63,9 +63,8 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
return count;
}
- /// If [entryPointParameters] is given, this block is an entry point
- /// and [entryPointParameters] is the list of function parameters.
- printBlock(Block block, {List<cps_ir.Definition> entryPointParameters}) {
+ /// If [entryPoint] is given, this block is an entry point.
+ printBlock(Block block, {cps_ir.FunctionDefinition entryPoint}) {
tag("block", () {
printProperty("name", block.name);
printProperty("from_bci", -1);
@@ -84,9 +83,12 @@ class IRTracer extends TracerUtil implements cps_ir.Visitor {
String formatParameter(cps_ir.Parameter param) {
return '${names.name(param)} ${param.type}';
}
- if (entryPointParameters != null) {
- String params = entryPointParameters.map(formatParameter).join(', ');
- printStmt('x0', 'Entry ($params)');
+ if (entryPoint != null) {
+ String thisParam = entryPoint.thisParameter != null
+ ? formatParameter(entryPoint.thisParameter)
+ : 'no receiver';
+ String params = entryPoint.parameters.map(formatParameter).join(', ');
+ printStmt('x0', 'Entry ($thisParam) ($params)');
}
String params = block.parameters.map(formatParameter).join(', ');
printStmt('x0', 'Parameters ($params)');
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/redundant_join.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698