summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/access-builder.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/access-builder.cc')
-rw-r--r--deps/v8/src/compiler/access-builder.cc153
1 files changed, 124 insertions, 29 deletions
diff --git a/deps/v8/src/compiler/access-builder.cc b/deps/v8/src/compiler/access-builder.cc
index 5fbbdd09da..7712aac131 100644
--- a/deps/v8/src/compiler/access-builder.cc
+++ b/deps/v8/src/compiler/access-builder.cc
@@ -16,15 +16,6 @@ namespace internal {
namespace compiler {
// static
-FieldAccess AccessBuilder::ForExternalDoubleValue() {
- FieldAccess access = {kUntaggedBase, 0,
- MaybeHandle<Name>(), MaybeHandle<Map>(),
- Type::Number(), MachineType::Float64(),
- kNoWriteBarrier};
- return access;
-}
-
-// static
FieldAccess AccessBuilder::ForExternalTaggedValue() {
FieldAccess access = {kUntaggedBase, 0,
MaybeHandle<Name>(), MaybeHandle<Map>(),
@@ -64,7 +55,7 @@ FieldAccess AccessBuilder::ForHeapNumberValue() {
// static
FieldAccess AccessBuilder::ForJSObjectProperties() {
- FieldAccess access = {kTaggedBase, JSObject::kPropertiesOffset,
+ FieldAccess access = {kTaggedBase, JSObject::kPropertiesOrHashOffset,
MaybeHandle<Name>(), MaybeHandle<Map>(),
Type::Internal(), MachineType::TaggedPointer(),
kPointerWriteBarrier};
@@ -113,6 +104,28 @@ FieldAccess AccessBuilder::ForJSCollectionTable() {
}
// static
+FieldAccess AccessBuilder::ForJSCollectionIteratorTable() {
+ FieldAccess access = {
+ kTaggedBase, JSCollectionIterator::kTableOffset,
+ MaybeHandle<Name>(), MaybeHandle<Map>(),
+ Type::OtherInternal(), MachineType::TaggedPointer(),
+ kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForJSCollectionIteratorIndex() {
+ FieldAccess access = {kTaggedBase,
+ JSCollectionIterator::kIndexOffset,
+ MaybeHandle<Name>(),
+ MaybeHandle<Map>(),
+ TypeCache::Get().kFixedArrayLengthType,
+ MachineType::TaggedSigned(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
FieldAccess AccessBuilder::ForJSFunctionPrototypeOrInitialMap() {
FieldAccess access = {
kTaggedBase, JSFunction::kPrototypeOrInitialMapOffset,
@@ -171,6 +184,35 @@ FieldAccess AccessBuilder::ForJSFunctionNextFunctionLink() {
}
// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundTargetFunction() {
+ FieldAccess access = {
+ kTaggedBase, JSBoundFunction::kBoundTargetFunctionOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::Callable(), MachineType::TaggedPointer(),
+ kPointerWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundThis() {
+ FieldAccess access = {kTaggedBase, JSBoundFunction::kBoundThisOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::NonInternal(), MachineType::AnyTagged(),
+ kFullWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForJSBoundFunctionBoundArguments() {
+ FieldAccess access = {
+ kTaggedBase, JSBoundFunction::kBoundArgumentsOffset,
+ Handle<Name>(), MaybeHandle<Map>(),
+ Type::Internal(), MachineType::TaggedPointer(),
+ kPointerWriteBarrier};
+ return access;
+}
+
+// static
FieldAccess AccessBuilder::ForJSGeneratorObjectContext() {
FieldAccess access = {kTaggedBase, JSGeneratorObject::kContextOffset,
Handle<Name>(), MaybeHandle<Map>(),
@@ -249,16 +291,6 @@ FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectQueue() {
}
// static
-FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectAwaitInputOrDebugPos() {
- FieldAccess access = {
- kTaggedBase, JSAsyncGeneratorObject::kAwaitInputOrDebugPosOffset,
- Handle<Name>(), MaybeHandle<Map>(),
- Type::NonInternal(), MachineType::AnyTagged(),
- kFullWriteBarrier};
- return access;
-}
-
-// static
FieldAccess AccessBuilder::ForJSAsyncGeneratorObjectAwaitedPromise() {
FieldAccess access = {
kTaggedBase, JSAsyncGeneratorObject::kAwaitedPromiseOffset,
@@ -278,7 +310,7 @@ FieldAccess AccessBuilder::ForJSArrayLength(ElementsKind elements_kind) {
type_cache.kJSArrayLengthType,
MachineType::TaggedSigned(),
kFullWriteBarrier};
- if (IsFastDoubleElementsKind(elements_kind)) {
+ if (IsDoubleElementsKind(elements_kind)) {
access.type = type_cache.kFixedDoubleArrayLengthType;
access.write_barrier_kind = kNoWriteBarrier;
} else if (IsFastElementsKind(elements_kind)) {
@@ -481,6 +513,14 @@ FieldAccess AccessBuilder::ForMapBitField() {
return access;
}
+// static
+FieldAccess AccessBuilder::ForMapBitField2() {
+ FieldAccess access = {
+ kTaggedBase, Map::kBitField2Offset, Handle<Name>(),
+ MaybeHandle<Map>(), TypeCache::Get().kUint8, MachineType::Uint8(),
+ kNoWriteBarrier};
+ return access;
+}
// static
FieldAccess AccessBuilder::ForMapBitField3() {
@@ -691,7 +731,7 @@ FieldAccess AccessBuilder::ForJSArrayIteratorIndex(InstanceType instance_type,
MachineType::AnyTagged(),
kFullWriteBarrier};
if (instance_type == JS_ARRAY_TYPE) {
- if (IsFastDoubleElementsKind(elements_kind)) {
+ if (IsDoubleElementsKind(elements_kind)) {
access.type = TypeCache::Get().kFixedDoubleArrayLengthType;
access.machine_type = MachineType::TaggedSigned();
access.write_barrier_kind = kNoWriteBarrier;
@@ -836,25 +876,25 @@ ElementAccess AccessBuilder::ForFixedArrayElement(ElementsKind kind) {
ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
MachineType::AnyTagged(), kFullWriteBarrier};
switch (kind) {
- case FAST_SMI_ELEMENTS:
+ case PACKED_SMI_ELEMENTS:
access.type = Type::SignedSmall();
access.machine_type = MachineType::TaggedSigned();
access.write_barrier_kind = kNoWriteBarrier;
break;
- case FAST_HOLEY_SMI_ELEMENTS:
+ case HOLEY_SMI_ELEMENTS:
access.type = TypeCache::Get().kHoleySmi;
break;
- case FAST_ELEMENTS:
+ case PACKED_ELEMENTS:
access.type = Type::NonInternal();
break;
- case FAST_HOLEY_ELEMENTS:
+ case HOLEY_ELEMENTS:
break;
- case FAST_DOUBLE_ELEMENTS:
+ case PACKED_DOUBLE_ELEMENTS:
access.type = Type::Number();
access.write_barrier_kind = kNoWriteBarrier;
access.machine_type = MachineType::Float64();
break;
- case FAST_HOLEY_DOUBLE_ELEMENTS:
+ case HOLEY_DOUBLE_ELEMENTS:
access.type = Type::NumberOrHole();
access.write_barrier_kind = kNoWriteBarrier;
access.machine_type = MachineType::Float64();
@@ -966,10 +1006,65 @@ FieldAccess AccessBuilder::ForHashTableBaseCapacity() {
}
// static
+FieldAccess AccessBuilder::ForOrderedHashTableBaseNextTable() {
+ // TODO(turbofan): This will be redundant with the HashTableBase
+ // methods above once the hash table unification is done.
+ FieldAccess const access = {
+ kTaggedBase, OrderedHashTableBase::kNextTableOffset,
+ MaybeHandle<Name>(), MaybeHandle<Map>(),
+ Type::Any(), MachineType::AnyTagged(),
+ kFullWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForOrderedHashTableBaseNumberOfBuckets() {
+ // TODO(turbofan): This will be redundant with the HashTableBase
+ // methods above once the hash table unification is done.
+ FieldAccess const access = {kTaggedBase,
+ OrderedHashTableBase::kNumberOfBucketsOffset,
+ MaybeHandle<Name>(),
+ MaybeHandle<Map>(),
+ TypeCache::Get().kFixedArrayLengthType,
+ MachineType::TaggedSigned(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForOrderedHashTableBaseNumberOfDeletedElements() {
+ // TODO(turbofan): This will be redundant with the HashTableBase
+ // methods above once the hash table unification is done.
+ FieldAccess const access = {
+ kTaggedBase,
+ OrderedHashTableBase::kNumberOfDeletedElementsOffset,
+ MaybeHandle<Name>(),
+ MaybeHandle<Map>(),
+ TypeCache::Get().kFixedArrayLengthType,
+ MachineType::TaggedSigned(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
+FieldAccess AccessBuilder::ForOrderedHashTableBaseNumberOfElements() {
+ // TODO(turbofan): This will be redundant with the HashTableBase
+ // methods above once the hash table unification is done.
+ FieldAccess const access = {kTaggedBase,
+ OrderedHashTableBase::kNumberOfElementsOffset,
+ MaybeHandle<Name>(),
+ MaybeHandle<Map>(),
+ TypeCache::Get().kFixedArrayLengthType,
+ MachineType::TaggedSigned(),
+ kNoWriteBarrier};
+ return access;
+}
+
+// static
FieldAccess AccessBuilder::ForDictionaryMaxNumberKey() {
FieldAccess access = {
kTaggedBase,
- FixedArray::OffsetOfElementAt(NameDictionary::kMaxNumberKeyIndex),
+ FixedArray::OffsetOfElementAt(SeededNumberDictionary::kMaxNumberKeyIndex),
MaybeHandle<Name>(),
MaybeHandle<Map>(),
Type::Any(),