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

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: Rebase 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
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 a9d529263169ea94c622a92efca55fea5b846b2a..030daca0ac0542e3e53d228ffb6ef586b9a7a164 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -129,7 +129,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) {
@@ -141,6 +141,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
@@ -184,8 +185,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().
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/unsugar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698