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/path_based_optimizer.dart

Issue 1743283002: dart2js cps: Use definitions by default, not references. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix doc comments and long lines Created 4 years, 10 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/path_based_optimizer.dart
diff --git a/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart b/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
index 6f9fac5aba837c93bca9f7b71f558a9293980728..aed13e6e34ce748e9d12405cb7513eca09fb6b04 100644
--- a/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
+++ b/pkg/compiler/lib/src/cps_ir/path_based_optimizer.dart
@@ -117,7 +117,7 @@ class PathBasedOptimizer extends TrampolineRecursiveVisitor
}
void visitInvokeContinuation(InvokeContinuation node) {
- Continuation cont = node.continuation.definition;
+ Continuation cont = node.continuation;
if (cont.isReturnContinuation) return;
if (node.isRecursive) return;
Map<Primitive, int> target = valuesAt[cont];
@@ -131,9 +131,9 @@ class PathBasedOptimizer extends TrampolineRecursiveVisitor
}
visitBranch(Branch node) {
- Primitive condition = node.condition.definition.effectiveDefinition;
- Continuation trueCont = node.trueContinuation.definition;
- Continuation falseCont = node.falseContinuation.definition;
+ Primitive condition = node.condition.effectiveDefinition;
+ Continuation trueCont = node.trueContinuation;
+ Continuation falseCont = node.falseContinuation;
if (condition.hasExactlyOneUse) {
// Handle common case specially. Do not add [condition] to the map if
// there are no other uses.
@@ -167,7 +167,7 @@ class PathBasedOptimizer extends TrampolineRecursiveVisitor
// self-interceptor.
// TODO(25646): If TypeMasks could represent "any self-interceptor" this
// optimization should be subsumed by type propagation.
- node.receiver.changeTo(node.dartReceiver);
+ node.receiverRef.changeTo(node.dartReceiver);
// Replace the extra receiver argument with a dummy value if the
// target definitely does not use it.
@@ -176,7 +176,7 @@ class PathBasedOptimizer extends TrampolineRecursiveVisitor
Constant dummy = new Constant(new IntConstantValue(0))
..type = typeSystem.intType;
new LetPrim(dummy).insertAbove(node.parent);
- node.arguments[0].changeTo(dummy);
+ node.argumentRefs[0].changeTo(dummy);
node.callingConvention = CallingConvention.DummyIntercepted;
}
}

Powered by Google App Engine
This is Rietveld 408576698