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

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

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/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 faaf93e287a912b37f0c08b0ebf887360ed94fa6..b4ca8e12dd6b4a30696ec6f7ff8dfd5b1e9f04bf 100644
--- a/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
+++ b/pkg/compiler/lib/src/cps_ir/bounds_checker.dart
@@ -124,13 +124,13 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
return lengthOf
.putIfAbsent(indexableObject, () => <int, SignedVariable>{})
.putIfAbsent(effectNumber, () {
- int length = types.getContainerLength(type);
- if (length != null) {
- return octagon.makeVariable(length, length);
- } else {
- return octagon.makeVariable(0, MAX_UINT32);
- }
- });
+ int length = types.getContainerLength(type);
+ if (length != null) {
+ return octagon.makeVariable(length, length);
+ } else {
+ return octagon.makeVariable(0, MAX_UINT32);
+ }
+ });
}
// ------------- CONSTRAINT HELPERS -----------------
@@ -493,9 +493,8 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
void visitBoundsCheck(BoundsCheck node) {
if (node.checks == BoundsCheck.NONE) return;
assert(node.indexRef != null); // Because there is at least one check.
- SignedVariable length = node.lengthRef == null
- ? null
- : getValue(node.length);
+ SignedVariable length =
+ node.lengthRef == null ? null : getValue(node.length);
SignedVariable index = getValue(node.index);
if (node.hasUpperBoundCheck) {
if (isDefinitelyLessThan(index, length)) {
@@ -519,12 +518,16 @@ class BoundsChecker extends TrampolineRecursiveVisitor implements Pass {
}
}
if (!node.lengthUsedInCheck && node.lengthRef != null) {
- node..lengthRef.unlink()..lengthRef = null;
+ node
+ ..lengthRef.unlink()
+ ..lengthRef = null;
}
if (node.checks == BoundsCheck.NONE) {
// We can't remove the bounds check node because it may still be used to
// restrict code motion. But the index is no longer needed.
- node..indexRef.unlink()..indexRef = null;
+ node
+ ..indexRef.unlink()
+ ..indexRef = null;
}
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart ('k') | pkg/compiler/lib/src/cps_ir/builtin_operator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698