Index: src/compiler/access-builder.cc |
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc |
index d52ca94d3ef704cbb063ec4a44c0aa0083124c27..791453c3dfc005cf2212f564614473097c082885 100644 |
--- a/src/compiler/access-builder.cc |
+++ b/src/compiler/access-builder.cc |
@@ -3,6 +3,11 @@ |
// found in the LICENSE file. |
#include "src/compiler/access-builder.h" |
+ |
+#include "src/contexts.h" |
+#include "src/frames.h" |
+#include "src/heap/heap.h" |
+#include "src/type-cache.h" |
#include "src/types-inl.h" |
namespace v8 { |
@@ -20,7 +25,7 @@ FieldAccess AccessBuilder::ForMap() { |
// static |
FieldAccess AccessBuilder::ForJSObjectProperties() { |
FieldAccess access = {kTaggedBase, JSObject::kPropertiesOffset, |
- MaybeHandle<Name>(), Type::Any(), kMachAnyTagged}; |
+ MaybeHandle<Name>(), Type::Internal(), kMachAnyTagged}; |
return access; |
} |
@@ -67,12 +72,10 @@ FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) { |
// static |
-FieldAccess AccessBuilder::ForFixedArrayLength(Zone* zone) { |
- FieldAccess access = { |
- kTaggedBase, FixedArray::kLengthOffset, MaybeHandle<Name>(), |
- Type::Intersect(Type::Range(0, FixedArray::kMaxLength, zone), |
- Type::TaggedSigned(), zone), |
- kMachAnyTagged}; |
+FieldAccess AccessBuilder::ForFixedArrayLength() { |
+ FieldAccess access = {kTaggedBase, FixedArray::kLengthOffset, |
+ MaybeHandle<Name>(), |
+ TypeCache::Get().kFixedArrayLengthType, kMachAnyTagged}; |
return access; |
} |
@@ -95,11 +98,9 @@ FieldAccess AccessBuilder::ForDescriptorArrayEnumCacheBridgeCache() { |
// static |
-FieldAccess AccessBuilder::ForMapBitField3(Zone* zone) { |
- FieldAccess access = { |
- kTaggedBase, Map::kBitField3Offset, Handle<Name>(), |
- Type::Intersect(Type::Signed32(), Type::UntaggedSigned32(), zone), |
- kMachInt32}; |
+FieldAccess AccessBuilder::ForMapBitField3() { |
+ FieldAccess access = {kTaggedBase, Map::kBitField3Offset, Handle<Name>(), |
+ TypeCache::Get().kInt32, kMachInt32}; |
return access; |
} |
@@ -115,18 +116,15 @@ FieldAccess AccessBuilder::ForMapDescriptors() { |
// static |
FieldAccess AccessBuilder::ForMapInstanceType() { |
FieldAccess access = {kTaggedBase, Map::kInstanceTypeOffset, Handle<Name>(), |
- Type::UntaggedUnsigned8(), kMachUint8}; |
+ TypeCache::Get().kUint8, kMachUint8}; |
return access; |
} |
// static |
-FieldAccess AccessBuilder::ForStringLength(Zone* zone) { |
- FieldAccess access = { |
- kTaggedBase, String::kLengthOffset, Handle<Name>(), |
- Type::Intersect(Type::Range(0, String::kMaxLength, zone), |
- Type::TaggedSigned(), zone), |
- kMachAnyTagged}; |
+FieldAccess AccessBuilder::ForStringLength() { |
+ FieldAccess access = {kTaggedBase, String::kLengthOffset, Handle<Name>(), |
+ TypeCache::Get().kStringLengthType, kMachAnyTagged}; |
return access; |
} |
@@ -301,8 +299,8 @@ ElementAccess AccessBuilder::ForSeqStringChar(String::Encoding encoding) { |
// static |
FieldAccess AccessBuilder::ForStatsCounter() { |
- FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(), Type::Signed32(), |
- kMachInt32}; |
+ FieldAccess access = {kUntaggedBase, 0, MaybeHandle<Name>(), |
+ TypeCache::Get().kInt32, kMachInt32}; |
return access; |
} |