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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 1375213003: dart2js cps: Maintain parent pointers instead of recomputing them. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index 92cd2c0bc5006202395ff05aa43b5732bdeaa168..4843f148cd5d060b6347e5bbabbff768d15b5174 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -121,7 +121,7 @@ class CpsFunctionCompiler implements FunctionCompiler {
});
traceGraph(pass.passName, cpsFunction);
dumpTypedIr(pass.passName, cpsFunction);
- assert(checkCpsIntegrity(cpsFunction));
+ assert(checkCpsIntegrity(cpsFunction, pass.passName));
}
cps.FunctionDefinition compileToCpsIr(AstElement element) {
@@ -133,6 +133,7 @@ class CpsFunctionCompiler implements FunctionCompiler {
giveUp(cpsBuilderTask.bailoutMessage);
}
}
+ ParentVisitor.setParents(cpsFunction);
traceGraph('IR Builder', cpsFunction);
dumpTypedIr('IR Builder', cpsFunction);
// Eliminating redundant phis before the unsugaring pass will make it
@@ -176,8 +177,8 @@ class CpsFunctionCompiler implements FunctionCompiler {
}
}
- static bool checkCpsIntegrity(cps.FunctionDefinition node) {
- new CheckCpsIntegrity().check(node);
+ static bool checkCpsIntegrity(cps.FunctionDefinition node, String pass) {
+ new CheckCpsIntegrity().check(node, pass);
return true; // So this can be used from assert().
}

Powered by Google App Engine
This is Rietveld 408576698