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

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

Issue 1699033003: dart2js cps: Combine integer type check with bounds check. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status 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 3500521ac01464102c55211ee7276f96059846b2..5ce47a2d150c1c1cb729a9d5a42b1cb3a1731e43 100644
--- a/pkg/compiler/lib/src/cps_ir/update_refinements.dart
+++ b/pkg/compiler/lib/src/cps_ir/update_refinements.dart
@@ -73,6 +73,14 @@ class UpdateRefinements extends TrampolineRecursiveVisitor implements Pass {
});
}
+ visitBoundsCheck(BoundsCheck node) {
+ super.visitBoundsCheck(node);
+ if (node.hasIntegerCheck &&
+ typeSystem.isDefinitelyInt(node.index.definition.type)) {
+ node.checks &= ~BoundsCheck.INTEGER;
+ }
+ }
+
processReference(Reference ref) {
refine(ref);
}

Powered by Google App Engine
This is Rietveld 408576698