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

Unified Diff: pkg/compiler/lib/src/cps_ir/update_refinements.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/update_refinements.dart
diff --git a/pkg/compiler/lib/src/cps_ir/update_refinements.dart b/pkg/compiler/lib/src/cps_ir/update_refinements.dart
index 5ce47a2d150c1c1cb729a9d5a42b1cb3a1731e43..313f2cb2d830b4ccaa9b1b9666ec46c586cbe860 100644
--- a/pkg/compiler/lib/src/cps_ir/update_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/update_refinements.dart
@@ -37,9 +37,9 @@ class UpdateRefinements extends TrampolineRecursiveVisitor implements Pass {
}
visitReceiverCheck(ReceiverCheck node) {
- if (refine(node.value)) {
+ if (refine(node.valueRef)) {
// Update the type if the input has changed.
- Primitive value = node.value.definition;
+ Primitive value = node.value;
if (value.type.needsNoSuchMethodHandling(node.selector, classWorld)) {
node.type = typeSystem.receiverTypeFor(node.selector, value.type);
} else {
@@ -76,7 +76,7 @@ class UpdateRefinements extends TrampolineRecursiveVisitor implements Pass {
visitBoundsCheck(BoundsCheck node) {
super.visitBoundsCheck(node);
if (node.hasIntegerCheck &&
- typeSystem.isDefinitelyInt(node.index.definition.type)) {
+ typeSystem.isDefinitelyInt(node.index.type)) {
node.checks &= ~BoundsCheck.INTEGER;
}
}

Powered by Google App Engine
This is Rietveld 408576698