[ptr-compr][turbofan] Now using Compressed representation, type and access

Follow -up CL that aims to eliminate the straggler tagged loads and stores.

It includes a lot of access builder changes. There are 8 access
(2 Any and 6 Pointer) that are still remaining as tagged since changing
those to compressed make some tests fail.

Cq-Include-Trybots: luci.v8.try:v8_linux64_pointer_compression_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_linux64_arm64_pointer_compression_rel_ng
Bug: v8:8977, v8:7703
Change-Id: Iad305fd3a2da257764d22bad30b25489f727e676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1588431
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61270}
This commit is contained in:
Santiago Aboy Solanes 2019-04-30 14:03:12 +01:00 committed by Commit Bot
parent df6029f5a9
commit eef7b8d675
5 changed files with 231 additions and 194 deletions

View File

@ -43,6 +43,8 @@ FieldAccess AccessBuilder::ForExternalUint8Value() {
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForMap() { FieldAccess AccessBuilder::ForMap() {
FieldAccess access = {kTaggedBase, HeapObject::kMapOffset, FieldAccess access = {kTaggedBase, HeapObject::kMapOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
@ -82,6 +84,8 @@ FieldAccess AccessBuilder::ForBigIntBitfield() {
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::AnyTagged to
// MachineType::TypeCompressedTagged
FieldAccess AccessBuilder::ForJSObjectPropertiesOrHash() { FieldAccess AccessBuilder::ForJSObjectPropertiesOrHash() {
FieldAccess access = {kTaggedBase, JSObject::kPropertiesOrHashOffset, FieldAccess access = {kTaggedBase, JSObject::kPropertiesOrHashOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
@ -90,8 +94,9 @@ FieldAccess AccessBuilder::ForJSObjectPropertiesOrHash() {
return access; return access;
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForJSObjectElements() { FieldAccess AccessBuilder::ForJSObjectElements() {
FieldAccess access = {kTaggedBase, JSObject::kElementsOffset, FieldAccess access = {kTaggedBase, JSObject::kElementsOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
@ -105,29 +110,32 @@ FieldAccess AccessBuilder::ForJSObjectElements() {
FieldAccess AccessBuilder::ForJSObjectInObjectProperty(const MapRef& map, FieldAccess AccessBuilder::ForJSObjectInObjectProperty(const MapRef& map,
int index) { int index) {
int const offset = map.GetInObjectPropertyOffset(index); int const offset = map.GetInObjectPropertyOffset(index);
FieldAccess access = {kTaggedBase, offset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, offset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSObjectOffset( FieldAccess AccessBuilder::ForJSObjectOffset(
int offset, WriteBarrierKind write_barrier_kind) { int offset, WriteBarrierKind write_barrier_kind) {
FieldAccess access = {kTaggedBase, offset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, offset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
write_barrier_kind}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
write_barrier_kind};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSCollectionTable() { FieldAccess AccessBuilder::ForJSCollectionTable() {
FieldAccess access = {kTaggedBase, JSCollection::kTableOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSCollection::kTableOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -136,7 +144,7 @@ FieldAccess AccessBuilder::ForJSCollectionIteratorTable() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSCollectionIterator::kTableOffset, kTaggedBase, JSCollectionIterator::kTableOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::OtherInternal(), MachineType::TaggedPointer(), Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
@ -148,7 +156,7 @@ FieldAccess AccessBuilder::ForJSCollectionIteratorIndex() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kFixedArrayLengthType, TypeCache::Get()->kFixedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -158,17 +166,18 @@ FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset, kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(), Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSFunctionContext() { FieldAccess AccessBuilder::ForJSFunctionContext() {
FieldAccess access = {kTaggedBase, JSFunction::kContextOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSFunction::kContextOffset,
Type::Internal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Internal(), MachineType::TypeCompressedTagged(),
kPointerWriteBarrier};
return access; return access;
} }
@ -178,26 +187,28 @@ FieldAccess AccessBuilder::ForJSFunctionSharedFunctionInfo() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSFunction::kSharedFunctionInfoOffset, kTaggedBase, JSFunction::kSharedFunctionInfoOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::OtherInternal(), MachineType::TaggedPointer(), Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSFunctionFeedbackCell() { FieldAccess AccessBuilder::ForJSFunctionFeedbackCell() {
FieldAccess access = {kTaggedBase, JSFunction::kFeedbackCellOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSFunction::kFeedbackCellOffset,
Type::Internal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSFunctionCode() { FieldAccess AccessBuilder::ForJSFunctionCode() {
FieldAccess access = {kTaggedBase, JSFunction::kCodeOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSFunction::kCodeOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -206,17 +217,18 @@ FieldAccess AccessBuilder::ForJSBoundFunctionBoundTargetFunction() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSBoundFunction::kBoundTargetFunctionOffset, kTaggedBase, JSBoundFunction::kBoundTargetFunctionOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Callable(), MachineType::TaggedPointer(), Type::Callable(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSBoundFunctionBoundThis() { FieldAccess AccessBuilder::ForJSBoundFunctionBoundThis() {
FieldAccess access = {kTaggedBase, JSBoundFunction::kBoundThisOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSBoundFunction::kBoundThisOffset,
Type::NonInternal(), MachineType::AnyTagged(), Handle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
@ -225,35 +237,38 @@ FieldAccess AccessBuilder::ForJSBoundFunctionBoundArguments() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSBoundFunction::kBoundArgumentsOffset, kTaggedBase, JSBoundFunction::kBoundArgumentsOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Internal(), MachineType::TaggedPointer(), Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSGeneratorObjectContext() { FieldAccess AccessBuilder::ForJSGeneratorObjectContext() {
FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSGeneratorObject::kContextOffset,
Type::Internal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSGeneratorObjectFunction() { FieldAccess AccessBuilder::ForJSGeneratorObjectFunction() {
FieldAccess access = {kTaggedBase, JSGeneratorObject::kFunctionOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSGeneratorObject::kFunctionOffset,
Type::Function(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Function(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSGeneratorObjectReceiver() { FieldAccess AccessBuilder::ForJSGeneratorObjectReceiver() {
FieldAccess access = {kTaggedBase, JSGeneratorObject::kReceiverOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSGeneratorObject::kReceiverOffset,
Type::Internal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -262,7 +277,7 @@ FieldAccess AccessBuilder::ForJSGeneratorObjectContinuation() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGeneratorObject::kContinuationOffset, kTaggedBase, JSGeneratorObject::kContinuationOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::SignedSmall(), MachineType::TaggedSigned(), Type::SignedSmall(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -272,7 +287,7 @@ FieldAccess AccessBuilder::ForJSGeneratorObjectInputOrDebugPos() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGeneratorObject::kInputOrDebugPosOffset, kTaggedBase, JSGeneratorObject::kInputOrDebugPosOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::NonInternal(), MachineType::AnyTagged(), Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -283,7 +298,7 @@ FieldAccess AccessBuilder::ForJSGeneratorObjectParametersAndRegisters() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGeneratorObject::kParametersAndRegistersOffset, kTaggedBase, JSGeneratorObject::kParametersAndRegistersOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Internal(), MachineType::AnyTagged(), Type::Internal(), MachineType::TypeCompressedTagged(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
@ -293,7 +308,7 @@ FieldAccess AccessBuilder::ForJSGeneratorObjectResumeMode() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGeneratorObject::kResumeModeOffset, kTaggedBase, JSGeneratorObject::kResumeModeOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::SignedSmall(), MachineType::TaggedSigned(), Type::SignedSmall(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -303,7 +318,7 @@ FieldAccess AccessBuilder::ForJSAsyncFunctionObjectPromise() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSAsyncFunctionObject::kPromiseOffset, kTaggedBase, JSAsyncFunctionObject::kPromiseOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::OtherObject(), MachineType::TaggedPointer(), Type::OtherObject(), MachineType::TypeCompressedTaggedPointer(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -313,7 +328,7 @@ FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectQueue() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSAsyncGeneratorObject::kQueueOffset, kTaggedBase, JSAsyncGeneratorObject::kQueueOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::NonInternal(), MachineType::AnyTagged(), Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -323,7 +338,7 @@ FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectIsAwaiting() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSAsyncGeneratorObject::kIsAwaitingOffset, kTaggedBase, JSAsyncGeneratorObject::kIsAwaitingOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::SignedSmall(), MachineType::TaggedSigned(), Type::SignedSmall(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -336,7 +351,7 @@ FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) {
Handle<Name>(), Handle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
type_cache->kJSArrayLengthType, type_cache->kJSArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kFullWriteBarrier}; kFullWriteBarrier};
if (IsDoubleElementsKind(elements_kind)) { if (IsDoubleElementsKind(elements_kind)) {
access.type = type_cache->kFixedDoubleArrayLengthType; access.type = type_cache->kFixedDoubleArrayLengthType;
@ -370,10 +385,11 @@ FieldAccess AccessBuilder::ForJSArrayBufferBitField() {
// static // static
FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() { FieldAccess AccessBuilder::ForJSArrayBufferViewBuffer() {
FieldAccess access = {kTaggedBase, JSArrayBufferView::kBufferOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSArrayBufferView::kBufferOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -408,7 +424,7 @@ FieldAccess AccessBuilder::ForJSTypedArrayLength() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kJSTypedArrayLengthType, TypeCache::Get()->kJSTypedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -420,7 +436,7 @@ FieldAccess AccessBuilder::ForJSDateValue() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kJSDateValueType, TypeCache::Get()->kJSDateValueType,
MachineType::AnyTagged(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -430,7 +446,7 @@ FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSDate::kValueOffset + index * kTaggedSize, kTaggedBase, JSDate::kValueOffset + index * kTaggedSize,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::Number(), MachineType::AnyTagged(), Type::Number(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -438,56 +454,62 @@ FieldAccess AccessBuilder::ForJSDateField(JSDate::FieldIndex index) {
// static // static
FieldAccess AccessBuilder::ForJSIteratorResultDone() { FieldAccess AccessBuilder::ForJSIteratorResultDone() {
FieldAccess access = {kTaggedBase, JSIteratorResult::kDoneOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSIteratorResult::kDoneOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSIteratorResultValue() { FieldAccess AccessBuilder::ForJSIteratorResultValue() {
FieldAccess access = {kTaggedBase, JSIteratorResult::kValueOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSIteratorResult::kValueOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSRegExpData() { FieldAccess AccessBuilder::ForJSRegExpData() {
FieldAccess access = {kTaggedBase, JSRegExp::kDataOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSRegExp::kDataOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSRegExpFlags() { FieldAccess AccessBuilder::ForJSRegExpFlags() {
FieldAccess access = {kTaggedBase, JSRegExp::kFlagsOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSRegExp::kFlagsOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSRegExpLastIndex() { FieldAccess AccessBuilder::ForJSRegExpLastIndex() {
FieldAccess access = {kTaggedBase, JSRegExp::kLastIndexOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSRegExp::kLastIndexOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSRegExpSource() { FieldAccess AccessBuilder::ForJSRegExpSource() {
FieldAccess access = {kTaggedBase, JSRegExp::kSourceOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSRegExp::kSourceOffset,
Type::NonInternal(), MachineType::AnyTagged(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
@ -499,7 +521,7 @@ FieldAccess AccessBuilder::ForFixedArrayLength() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kFixedArrayLengthType, TypeCache::Get()->kFixedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -509,7 +531,7 @@ FieldAccess AccessBuilder::ForPropertyArrayLengthAndHash() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, PropertyArray::kLengthAndHashOffset, kTaggedBase, PropertyArray::kLengthAndHashOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::SignedSmall(), MachineType::TaggedSigned(), Type::SignedSmall(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -519,7 +541,7 @@ FieldAccess AccessBuilder::ForFixedTypedArrayBaseBasePointer() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, FixedTypedArrayBase::kBasePointerOffset, kTaggedBase, FixedTypedArrayBase::kBasePointerOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::OtherInternal(), MachineType::AnyTagged(), Type::OtherInternal(), MachineType::TypeCompressedTagged(),
kPointerWriteBarrier, LoadSensitivity::kCritical}; kPointerWriteBarrier, LoadSensitivity::kCritical};
return access; return access;
} }
@ -542,7 +564,7 @@ FieldAccess AccessBuilder::ForDescriptorArrayEnumCache() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, DescriptorArray::kEnumCacheOffset, kTaggedBase, DescriptorArray::kEnumCacheOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::OtherInternal(), MachineType::TaggedPointer(), Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
@ -577,10 +599,11 @@ FieldAccess AccessBuilder::ForMapBitField3() {
// static // static
FieldAccess AccessBuilder::ForMapDescriptors() { FieldAccess AccessBuilder::ForMapDescriptors() {
FieldAccess access = {kTaggedBase, Map::kDescriptorsOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, Map::kDescriptorsOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -597,28 +620,31 @@ FieldAccess AccessBuilder::ForMapInstanceType() {
// static // static
FieldAccess AccessBuilder::ForMapPrototype() { FieldAccess AccessBuilder::ForMapPrototype() {
FieldAccess access = {kTaggedBase, Map::kPrototypeOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, Map::kPrototypeOffset,
Type::Any(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Any(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForModuleRegularExports() { FieldAccess AccessBuilder::ForModuleRegularExports() {
FieldAccess access = {kTaggedBase, Module::kRegularExportsOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, Module::kRegularExportsOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForModuleRegularImports() { FieldAccess AccessBuilder::ForModuleRegularImports() {
FieldAccess access = {kTaggedBase, Module::kRegularImportsOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, Module::kRegularImportsOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -644,6 +670,8 @@ FieldAccess AccessBuilder::ForStringLength() {
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForConsStringFirst() { FieldAccess AccessBuilder::ForConsStringFirst() {
FieldAccess access = {kTaggedBase, ConsString::kFirstOffset, FieldAccess access = {kTaggedBase, ConsString::kFirstOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
@ -654,14 +682,17 @@ FieldAccess AccessBuilder::ForConsStringFirst() {
// static // static
FieldAccess AccessBuilder::ForConsStringSecond() { FieldAccess AccessBuilder::ForConsStringSecond() {
FieldAccess access = {kTaggedBase, ConsString::kSecondOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, ConsString::kSecondOffset,
Type::String(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::String(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForThinStringActual() { FieldAccess AccessBuilder::ForThinStringActual() {
FieldAccess access = {kTaggedBase, ThinString::kActualOffset, FieldAccess access = {kTaggedBase, ThinString::kActualOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
@ -672,14 +703,17 @@ FieldAccess AccessBuilder::ForThinStringActual() {
// static // static
FieldAccess AccessBuilder::ForSlicedStringOffset() { FieldAccess AccessBuilder::ForSlicedStringOffset() {
FieldAccess access = {kTaggedBase, SlicedString::kOffsetOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, SlicedString::kOffsetOffset,
Type::SignedSmall(), MachineType::TaggedSigned(), Handle<Name>(), MaybeHandle<Map>(),
kNoWriteBarrier}; Type::SignedSmall(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier};
return access; return access;
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForSlicedStringParent() { FieldAccess AccessBuilder::ForSlicedStringParent() {
FieldAccess access = {kTaggedBase, SlicedString::kParentOffset, FieldAccess access = {kTaggedBase, SlicedString::kParentOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
@ -732,10 +766,11 @@ ElementAccess AccessBuilder::ForSeqTwoByteStringCharacter() {
// static // static
FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() { FieldAccess AccessBuilder::ForJSGlobalObjectGlobalProxy() {
FieldAccess access = {kTaggedBase, JSGlobalObject::kGlobalProxyOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSGlobalObject::kGlobalProxyOffset,
Type::Receiver(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::Receiver(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -744,12 +779,14 @@ FieldAccess AccessBuilder::ForJSGlobalObjectNativeContext() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGlobalObject::kNativeContextOffset, kTaggedBase, JSGlobalObject::kNativeContextOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Internal(), MachineType::TaggedPointer(), Type::Internal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::TaggedPointer to
// MachineType::TypeCompressedTaggedPointer
FieldAccess AccessBuilder::ForJSGlobalProxyNativeContext() { FieldAccess AccessBuilder::ForJSGlobalProxyNativeContext() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSGlobalProxy::kNativeContextOffset, kTaggedBase, JSGlobalProxy::kNativeContextOffset,
@ -764,7 +801,7 @@ FieldAccess AccessBuilder::ForJSArrayIteratorIteratedObject() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSArrayIterator::kIteratedObjectOffset, kTaggedBase, JSArrayIterator::kIteratedObjectOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Receiver(), MachineType::TaggedPointer(), Type::Receiver(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
@ -778,7 +815,7 @@ FieldAccess AccessBuilder::ForJSArrayIteratorNextIndex() {
Handle<Name>(), Handle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kPositiveSafeInteger, TypeCache::Get()->kPositiveSafeInteger,
MachineType::AnyTagged(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -790,17 +827,18 @@ FieldAccess AccessBuilder::ForJSArrayIteratorKind() {
Handle<Name>(), Handle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kJSArrayIteratorKindType, TypeCache::Get()->kJSArrayIteratorKindType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForJSStringIteratorString() { FieldAccess AccessBuilder::ForJSStringIteratorString() {
FieldAccess access = {kTaggedBase, JSStringIterator::kStringOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSStringIterator::kStringOffset,
Type::String(), MachineType::TaggedPointer(), Handle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::String(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -811,17 +849,18 @@ FieldAccess AccessBuilder::ForJSStringIteratorIndex() {
Handle<Name>(), Handle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kStringLengthType, TypeCache::Get()->kStringLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForValue() { FieldAccess AccessBuilder::ForValue() {
FieldAccess access = {kTaggedBase, JSValue::kValueOffset, FieldAccess access = {
Handle<Name>(), MaybeHandle<Map>(), kTaggedBase, JSValue::kValueOffset,
Type::NonInternal(), MachineType::AnyTagged(), Handle<Name>(), MaybeHandle<Map>(),
kFullWriteBarrier}; Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier};
return access; return access;
} }
@ -831,7 +870,7 @@ FieldAccess AccessBuilder::ForArgumentsLength() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSArgumentsObjectWithLength::kLengthOffset, kTaggedBase, JSArgumentsObjectWithLength::kLengthOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::NonInternal(), MachineType::AnyTagged(), Type::NonInternal(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -842,7 +881,7 @@ FieldAccess AccessBuilder::ForArgumentsCallee() {
FieldAccess access = { FieldAccess access = {
kTaggedBase, JSSloppyArgumentsObject::kCalleeOffset, kTaggedBase, JSSloppyArgumentsObject::kCalleeOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::NonInternal(), MachineType::AnyTagged(), Type::NonInternal(), MachineType::TypeCompressedTagged(),
kPointerWriteBarrier}; kPointerWriteBarrier};
return access; return access;
} }
@ -854,7 +893,7 @@ FieldAccess AccessBuilder::ForFixedArraySlot(
int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index)); int offset = FixedArray::OffsetOfElementAt(static_cast<int>(index));
FieldAccess access = {kTaggedBase, offset, FieldAccess access = {kTaggedBase, offset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(), Type::Any(), MachineType::TypeCompressedTagged(),
write_barrier_kind}; write_barrier_kind};
return access; return access;
} }
@ -864,7 +903,7 @@ FieldAccess AccessBuilder::ForFixedArraySlot(
FieldAccess AccessBuilder::ForCellValue() { FieldAccess AccessBuilder::ForCellValue() {
FieldAccess access = {kTaggedBase, Cell::kValueOffset, FieldAccess access = {kTaggedBase, Cell::kValueOffset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(), Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier, LoadSensitivity::kCritical}; kFullWriteBarrier, LoadSensitivity::kCritical};
return access; return access;
} }
@ -876,12 +915,14 @@ FieldAccess AccessBuilder::ForContextSlot(size_t index) {
Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag); Context::SlotOffset(static_cast<int>(index)) + kHeapObjectTag);
FieldAccess access = {kTaggedBase, offset, FieldAccess access = {kTaggedBase, offset,
Handle<Name>(), MaybeHandle<Map>(), Handle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(), Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
// static // static
// TODO(v8:8977, v8:7703): Change MachineType::AnyTagged to
// MachineType::TypeCompressedTagged
ElementAccess AccessBuilder::ForFixedArrayElement() { ElementAccess AccessBuilder::ForFixedArrayElement() {
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(), ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
MachineType::AnyTagged(), kFullWriteBarrier}; MachineType::AnyTagged(), kFullWriteBarrier};
@ -891,13 +932,14 @@ ElementAccess AccessBuilder::ForFixedArrayElement() {
// static // static
ElementAccess AccessBuilder::ForFixedArrayElement( ElementAccess AccessBuilder::ForFixedArrayElement(
ElementsKind kind, LoadSensitivity load_sensitivity) { ElementsKind kind, LoadSensitivity load_sensitivity) {
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, ElementAccess access = {
Type::Any(), MachineType::AnyTagged(), kTaggedBase, FixedArray::kHeaderSize,
kFullWriteBarrier, load_sensitivity}; Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier, load_sensitivity};
switch (kind) { switch (kind) {
case PACKED_SMI_ELEMENTS: case PACKED_SMI_ELEMENTS:
access.type = Type::SignedSmall(); access.type = Type::SignedSmall();
access.machine_type = MachineType::TaggedSigned(); access.machine_type = MachineType::TypeCompressedTaggedSigned();
access.write_barrier_kind = kNoWriteBarrier; access.write_barrier_kind = kNoWriteBarrier;
break; break;
case HOLEY_SMI_ELEMENTS: case HOLEY_SMI_ELEMENTS:
@ -945,19 +987,21 @@ ElementAccess AccessBuilder::ForFixedDoubleArrayElement() {
// static // static
FieldAccess AccessBuilder::ForEnumCacheKeys() { FieldAccess AccessBuilder::ForEnumCacheKeys() {
FieldAccess access = {kTaggedBase, EnumCache::kKeysOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, EnumCache::kKeysOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForEnumCacheIndices() { FieldAccess AccessBuilder::ForEnumCacheIndices() {
FieldAccess access = {kTaggedBase, EnumCache::kIndicesOffset, FieldAccess access = {
MaybeHandle<Name>(), MaybeHandle<Map>(), kTaggedBase, EnumCache::kIndicesOffset,
Type::OtherInternal(), MachineType::TaggedPointer(), MaybeHandle<Name>(), MaybeHandle<Map>(),
kPointerWriteBarrier}; Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier};
return access; return access;
} }
@ -1033,18 +1077,21 @@ FieldAccess AccessBuilder::ForHashTableBaseNumberOfElements() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
Type::SignedSmall(), Type::SignedSmall(),
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
// static // static
FieldAccess AccessBuilder::ForHashTableBaseNumberOfDeletedElement() { FieldAccess AccessBuilder::ForHashTableBaseNumberOfDeletedElement() {
FieldAccess access = { FieldAccess access = {kTaggedBase,
kTaggedBase, FixedArray::OffsetOfElementAt( FixedArray::OffsetOfElementAt(
HashTableBase::kNumberOfDeletedElementsIndex), HashTableBase::kNumberOfDeletedElementsIndex),
MaybeHandle<Name>(), MaybeHandle<Map>(), Type::SignedSmall(), MaybeHandle<Name>(),
MachineType::TaggedSigned(), kNoWriteBarrier}; MaybeHandle<Map>(),
Type::SignedSmall(),
MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier};
return access; return access;
} }
@ -1056,7 +1103,7 @@ FieldAccess AccessBuilder::ForHashTableBaseCapacity() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
Type::SignedSmall(), Type::SignedSmall(),
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -1070,7 +1117,7 @@ FieldAccess AccessBuilder::ForOrderedHashMapOrSetNextTable() {
FieldAccess const access = { FieldAccess const access = {
kTaggedBase, OrderedHashMap::NextTableOffset(), kTaggedBase, OrderedHashMap::NextTableOffset(),
MaybeHandle<Name>(), MaybeHandle<Map>(), MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::Any(), MachineType::AnyTagged(), Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
return access; return access;
} }
@ -1086,7 +1133,7 @@ FieldAccess AccessBuilder::ForOrderedHashMapOrSetNumberOfBuckets() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kFixedArrayLengthType, TypeCache::Get()->kFixedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -1102,7 +1149,7 @@ FieldAccess AccessBuilder::ForOrderedHashMapOrSetNumberOfDeletedElements() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kFixedArrayLengthType, TypeCache::Get()->kFixedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -1118,18 +1165,18 @@ FieldAccess AccessBuilder::ForOrderedHashMapOrSetNumberOfElements() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
TypeCache::Get()->kFixedArrayLengthType, TypeCache::Get()->kFixedArrayLengthType,
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
// static // static
ElementAccess AccessBuilder::ForOrderedHashMapEntryValue() { ElementAccess AccessBuilder::ForOrderedHashMapEntryValue() {
ElementAccess const access = {kTaggedBase, ElementAccess const access = {
OrderedHashMap::HashTableStartOffset() + kTaggedBase,
OrderedHashMap::kValueOffset * kTaggedSize, OrderedHashMap::HashTableStartOffset() +
Type::Any(), MachineType::AnyTagged(), OrderedHashMap::kValueOffset * kTaggedSize,
kFullWriteBarrier}; Type::Any(), MachineType::TypeCompressedTagged(), kFullWriteBarrier};
return access; return access;
} }
@ -1141,7 +1188,7 @@ FieldAccess AccessBuilder::ForDictionaryMaxNumberKey() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
Type::Any(), Type::Any(),
MachineType::AnyTagged(), MachineType::TypeCompressedTagged(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -1154,7 +1201,7 @@ FieldAccess AccessBuilder::ForDictionaryNextEnumerationIndex() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
Type::SignedSmall(), Type::SignedSmall(),
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }
@ -1167,7 +1214,7 @@ FieldAccess AccessBuilder::ForDictionaryObjectHashIndex() {
MaybeHandle<Name>(), MaybeHandle<Name>(),
MaybeHandle<Map>(), MaybeHandle<Map>(),
Type::SignedSmall(), Type::SignedSmall(),
MachineType::TaggedSigned(), MachineType::TypeCompressedTaggedSigned(),
kNoWriteBarrier}; kNoWriteBarrier};
return access; return access;
} }

View File

@ -174,11 +174,11 @@ bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that,
case AccessMode::kHas: case AccessMode::kHas:
case AccessMode::kLoad: { case AccessMode::kLoad: {
if (this->field_representation_ != that->field_representation_) { if (this->field_representation_ != that->field_representation_) {
if (!IsAnyTagged(this->field_representation_) || if (!IsAnyCompressedTagged(this->field_representation_) ||
!IsAnyTagged(that->field_representation_)) { !IsAnyCompressedTagged(that->field_representation_)) {
return false; return false;
} }
this->field_representation_ = MachineRepresentation::kTagged; this->field_representation_ = MachineType::RepCompressedTagged();
} }
if (this->field_map_.address() != that->field_map_.address()) { if (this->field_map_.address() != that->field_map_.address()) {
this->field_map_ = MaybeHandle<Map>(); this->field_map_ = MaybeHandle<Map>();
@ -325,23 +325,15 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo(
FieldIndex field_index = FieldIndex field_index =
FieldIndex::ForPropertyIndex(*map, index, details_representation); FieldIndex::ForPropertyIndex(*map, index, details_representation);
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
#ifdef V8_COMPRESS_POINTERS
MachineRepresentation field_representation = MachineRepresentation field_representation =
MachineRepresentation::kCompressed; MachineType::RepCompressedTagged();
#else
MachineRepresentation field_representation = MachineRepresentation::kTagged;
#endif
MaybeHandle<Map> field_map; MaybeHandle<Map> field_map;
MapRef map_ref(broker(), map); MapRef map_ref(broker(), map);
std::vector<CompilationDependencies::Dependency const*> std::vector<CompilationDependencies::Dependency const*>
unrecorded_dependencies; unrecorded_dependencies;
if (details_representation.IsSmi()) { if (details_representation.IsSmi()) {
field_type = Type::SignedSmall(); field_type = Type::SignedSmall();
#ifdef V8_COMPRESS_POINTERS field_representation = MachineType::RepCompressedTaggedSigned();
field_representation = MachineRepresentation::kCompressedSigned;
#else
field_representation = MachineRepresentation::kTaggedSigned;
#endif
map_ref.SerializeOwnDescriptors(); // TODO(neis): Remove later. map_ref.SerializeOwnDescriptors(); // TODO(neis): Remove later.
unrecorded_dependencies.push_back( unrecorded_dependencies.push_back(
dependencies()->FieldRepresentationDependencyOffTheRecord(map_ref, dependencies()->FieldRepresentationDependencyOffTheRecord(map_ref,
@ -352,11 +344,7 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo(
} else if (details_representation.IsHeapObject()) { } else if (details_representation.IsHeapObject()) {
// Extract the field type from the property details (make sure its // Extract the field type from the property details (make sure its
// representation is TaggedPointer to reflect the heap object case). // representation is TaggedPointer to reflect the heap object case).
#ifdef V8_COMPRESS_POINTERS field_representation = MachineType::RepCompressedTaggedPointer();
field_representation = MachineRepresentation::kCompressedPointer;
#else
field_representation = MachineRepresentation::kTaggedPointer;
#endif
Handle<FieldType> descriptors_field_type(descriptors->GetFieldType(number), Handle<FieldType> descriptors_field_type(descriptors->GetFieldType(number),
isolate()); isolate());
if (descriptors_field_type->IsNone()) { if (descriptors_field_type->IsNone()) {
@ -689,7 +677,8 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor(
FieldIndex field_index; FieldIndex field_index;
if (Accessors::IsJSObjectFieldAccessor(isolate(), map, name, &field_index)) { if (Accessors::IsJSObjectFieldAccessor(isolate(), map, name, &field_index)) {
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
MachineRepresentation field_representation = MachineRepresentation::kTagged; MachineRepresentation field_representation =
MachineType::RepCompressedTagged();
if (map->IsJSArrayMap()) { if (map->IsJSArrayMap()) {
DCHECK( DCHECK(
Name::Equals(isolate(), isolate()->factory()->length_string(), name)); Name::Equals(isolate(), isolate()->factory()->length_string(), name));
@ -700,10 +689,10 @@ PropertyAccessInfo AccessInfoFactory::LookupSpecialFieldAccessor(
// case of other arrays. // case of other arrays.
if (IsDoubleElementsKind(map->elements_kind())) { if (IsDoubleElementsKind(map->elements_kind())) {
field_type = type_cache_->kFixedDoubleArrayLengthType; field_type = type_cache_->kFixedDoubleArrayLengthType;
field_representation = MachineRepresentation::kTaggedSigned; field_representation = MachineType::RepCompressedTaggedSigned();
} else if (IsFastElementsKind(map->elements_kind())) { } else if (IsFastElementsKind(map->elements_kind())) {
field_type = type_cache_->kFixedArrayLengthType; field_type = type_cache_->kFixedArrayLengthType;
field_representation = MachineRepresentation::kTaggedSigned; field_representation = MachineType::RepCompressedTaggedSigned();
} else { } else {
field_type = type_cache_->kJSArrayLengthType; field_type = type_cache_->kJSArrayLengthType;
} }
@ -736,13 +725,14 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition(
details_representation); details_representation);
Type field_type = Type::NonInternal(); Type field_type = Type::NonInternal();
MaybeHandle<Map> field_map; MaybeHandle<Map> field_map;
MachineRepresentation field_representation = MachineRepresentation::kTagged; MachineRepresentation field_representation =
MachineType::RepCompressedTagged();
MapRef transition_map_ref(broker(), transition_map); MapRef transition_map_ref(broker(), transition_map);
std::vector<CompilationDependencies::Dependency const*> std::vector<CompilationDependencies::Dependency const*>
unrecorded_dependencies; unrecorded_dependencies;
if (details_representation.IsSmi()) { if (details_representation.IsSmi()) {
field_type = Type::SignedSmall(); field_type = Type::SignedSmall();
field_representation = MachineRepresentation::kTaggedSigned; field_representation = MachineType::RepCompressedTaggedSigned();
transition_map_ref.SerializeOwnDescriptors(); // TODO(neis): Remove later. transition_map_ref.SerializeOwnDescriptors(); // TODO(neis): Remove later.
unrecorded_dependencies.push_back( unrecorded_dependencies.push_back(
dependencies()->FieldRepresentationDependencyOffTheRecord( dependencies()->FieldRepresentationDependencyOffTheRecord(
@ -753,7 +743,7 @@ PropertyAccessInfo AccessInfoFactory::LookupTransition(
} else if (details_representation.IsHeapObject()) { } else if (details_representation.IsHeapObject()) {
// Extract the field type from the property details (make sure its // Extract the field type from the property details (make sure its
// representation is TaggedPointer to reflect the heap object case). // representation is TaggedPointer to reflect the heap object case).
field_representation = MachineRepresentation::kTaggedPointer; field_representation = MachineType::RepCompressedTaggedPointer();
Handle<FieldType> descriptors_field_type( Handle<FieldType> descriptors_field_type(
transition_map->instance_descriptors()->GetFieldType(number), transition_map->instance_descriptors()->GetFieldType(number),
isolate()); isolate());

View File

@ -4800,7 +4800,7 @@ Reduction JSCallReducer::ReduceArrayIteratorPrototypeNext(Node* node) {
FieldAccess index_access = AccessBuilder::ForJSArrayIteratorNextIndex(); FieldAccess index_access = AccessBuilder::ForJSArrayIteratorNextIndex();
if (IsFixedTypedArrayElementsKind(elements_kind)) { if (IsFixedTypedArrayElementsKind(elements_kind)) {
index_access.type = TypeCache::Get()->kJSTypedArrayLengthType; index_access.type = TypeCache::Get()->kJSTypedArrayLengthType;
index_access.machine_type = MachineType::TaggedSigned(); index_access.machine_type = MachineType::TypeCompressedTaggedSigned();
index_access.write_barrier_kind = kNoWriteBarrier; index_access.write_barrier_kind = kNoWriteBarrier;
} else { } else {
index_access.type = TypeCache::Get()->kJSArrayLengthType; index_access.type = TypeCache::Get()->kJSArrayLengthType;

View File

@ -1618,7 +1618,7 @@ Node* JSCreateLowering::AllocateFastLiteral(Node* effect, Node* control,
FieldIndex index = boilerplate_map.GetFieldIndexFor(i); FieldIndex index = boilerplate_map.GetFieldIndexFor(i);
FieldAccess access = { FieldAccess access = {
kTaggedBase, index.offset(), property_name.object(), kTaggedBase, index.offset(), property_name.object(),
MaybeHandle<Map>(), Type::Any(), MachineType::AnyTagged(), MaybeHandle<Map>(), Type::Any(), MachineType::TypeCompressedTagged(),
kFullWriteBarrier}; kFullWriteBarrier};
Node* value; Node* value;
if (boilerplate_map.IsUnboxedDoubleField(i)) { if (boilerplate_map.IsUnboxedDoubleField(i)) {

View File

@ -287,7 +287,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField(
FieldAccess const storage_access = { FieldAccess const storage_access = {
kTaggedBase, field_index.offset(), kTaggedBase, field_index.offset(),
name.object(), MaybeHandle<Map>(), name.object(), MaybeHandle<Map>(),
Type::OtherInternal(), MachineType::TaggedPointer(), Type::OtherInternal(), MachineType::TypeCompressedTaggedPointer(),
kPointerWriteBarrier, LoadSensitivity::kCritical}; kPointerWriteBarrier, LoadSensitivity::kCritical};
storage = *effect = graph()->NewNode( storage = *effect = graph()->NewNode(
simplified()->LoadField(storage_access), storage, *effect, *control); simplified()->LoadField(storage_access), storage, *effect, *control);