Index: src/compiler/access-builder.cc |
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc |
index b54982f4c9288e06e6da4af72a97e050d1444851..8a03ff77f38c5964f76e5a7bc73e75958505dbc9 100644 |
--- a/src/compiler/access-builder.cc |
+++ b/src/compiler/access-builder.cc |
@@ -67,14 +67,12 @@ FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { |
// static |
-FieldAccess AccessBuilder::ForFixedArrayLength() { |
- // TODO(turbofan): 2^30 is a valid upper limit for the FixedArray::length |
- // field, although it's not the best. If we had a Zone we could create an |
- // appropriate range type instead. |
+FieldAccess AccessBuilder::ForFixedArrayLength(Zone* zone) { |
STATIC_ASSERT(FixedArray::kMaxLength <= 1 << 30); |
FieldAccess access = { |
kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), |
- Type::Intersect(Type::Unsigned30(), Type::TaggedSigned()), |
+ Type::Intersect(Type::Range(0, FixedArray::kMaxLength, zone), |
+ Type::TaggedSigned(), zone), |
kMachAnyTagged}; |
return access; |
} |