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

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

Issue 1458703007: dart2js cps: Refactor CallExpressions into Primitives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Another minor fix Created 5 years, 1 month 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/bounds_checker.dart
diff --git a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
index 28dbd624e99acdb4c5156e06549e893c1f5cdf5a..abdd4e2ff20be988c53490892b57d7e4a4f56a31 100644
--- a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
+++ b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
@@ -398,7 +398,7 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
Monotonicity mono = monotonicity[param];
if (mono == null) {
// Value never changes. This is extremely uncommon.
- initialValue.substituteFor(param);
+ param.replaceUsesWith(initialValue);
} else if (mono == Monotonicity.Increasing) {
makeGreaterThanOrEqual(getValue(param), initialVariable);
} else if (mono == Monotonicity.Decreasing) {
@@ -468,7 +468,7 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
}
}
- // ---------------- CALL EXPRESSIONS --------------------
+ // ---------------- PRIMITIVES --------------------
@override
void visitInvokeMethod(InvokeMethod node) {
@@ -478,7 +478,6 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
.changesIndex()) {
currentEffectNumber = makeNewEffect();
}
- push(node.continuation.definition);
}
@override
@@ -486,7 +485,6 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
if (world.getSideEffectsOfElement(node.target).changesIndex()) {
currentEffectNumber = makeNewEffect();
}
- push(node.continuation.definition);
}
@override
@@ -499,7 +497,6 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
if (world.getSideEffectsOfElement(target).changesIndex()) {
currentEffectNumber = makeNewEffect();
}
- push(node.continuation.definition);
}
@override
@@ -507,19 +504,16 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
if (world.getSideEffectsOfElement(node.target).changesIndex()) {
currentEffectNumber = makeNewEffect();
}
- push(node.continuation.definition);
}
@override
void visitTypeCast(TypeCast node) {
- push(node.continuation.definition);
}
@override
void visitGetLazyStatic(GetLazyStatic node) {
// TODO(asgerf): How do we get the side effects of a lazy field initializer?
currentEffectNumber = makeNewEffect();
- push(node.continuation.definition);
}
@override
@@ -527,23 +521,18 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
if (node.nativeBehavior.sideEffects.changesIndex()) {
currentEffectNumber = makeNewEffect();
}
- push(node.continuation.definition);
}
@override
void visitAwait(Await node) {
currentEffectNumber = makeNewEffect();
- push(node.continuation.definition);
}
@override
void visitYield(Yield node) {
currentEffectNumber = makeNewEffect();
- push(node.continuation.definition);
}
- // ---------------- PRIMITIVES --------------------
-
@override
void visitApplyBuiltinMethod(ApplyBuiltinMethod node) {
Primitive receiver = node.receiver.definition;
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_fragment.dart » ('j') | pkg/compiler/lib/src/cps_ir/cps_fragment.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698