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

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

Issue 1238163003: dart2js cps: Share interceptors by default and propagate to use later. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Renamed to let_sinking.dart Created 5 years, 5 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 4a0de23c2699ebdb8739149869853ce9953f4cdc..de9713720e85b4d546345cbf926d71549a39effc 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -118,6 +118,10 @@ class CpsFunctionCompiler implements FunctionCompiler {
}
}
traceGraph("IR Builder", cpsNode);
+ // Eliminating redundant phis before the unsugaring pass will make it
+ // insert fewer getInterceptor calls.
+ new RedundantPhiEliminator().rewrite(cpsNode);
+ traceGraph("Redundant phi elimination", cpsNode);
new UnsugarVisitor(glue).rewrite(cpsNode);
traceGraph("Unsugaring", cpsNode);
return cpsNode;
@@ -169,7 +173,6 @@ class CpsFunctionCompiler implements FunctionCompiler {
assert(checkCpsIntegrity(cpsNode));
}
- applyCpsPass(new RedundantPhiEliminator());
TypePropagator typePropagator = new TypePropagator(compiler);
applyCpsPass(typePropagator);
dumpTypedIR(cpsNode, typePropagator);
@@ -178,6 +181,7 @@ class CpsFunctionCompiler implements FunctionCompiler {
applyCpsPass(new RedundantJoinEliminator());
applyCpsPass(new RedundantPhiEliminator());
applyCpsPass(new ShrinkingReducer());
+ applyCpsPass(new LetSinker());
return cpsNode;
}
« 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