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; |
} |
} |