v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::DescriptorArray Class Reference

#include <descriptor-array.h>

Inheritance diagram for v8::internal::DescriptorArray:
Collaboration diagram for v8::internal::DescriptorArray:

Public Types

using EntryKeyField = TaggedField<HeapObject, kEntryKeyOffset>
 
using EntryDetailsField = TaggedField<Smi, kEntryDetailsOffset>
 
using EntryValueField = TaggedField<MaybeObject, kEntryValueOffset>
 

Public Member Functions

int16_t number_of_slack_descriptors () const
 
int number_of_entries () const
 
void ClearEnumCache ()
 
void CopyEnumCacheFrom (Tagged< DescriptorArray > array)
 
Tagged< NameGetKey (InternalIndex descriptor_number) const
 
Tagged< NameGetKey (PtrComprCageBase cage_base, InternalIndex descriptor_number) const
 
Tagged< ObjectGetStrongValue (InternalIndex descriptor_number)
 
Tagged< ObjectGetStrongValue (PtrComprCageBase cage_base, InternalIndex descriptor_number)
 
Tagged< MaybeObjectGetValue (InternalIndex descriptor_number)
 
Tagged< MaybeObjectGetValue (PtrComprCageBase cage_base, InternalIndex descriptor_number)
 
PropertyDetails GetDetails (InternalIndex descriptor_number)
 
int GetFieldIndex (InternalIndex descriptor_number)
 
Tagged< FieldTypeGetFieldType (InternalIndex descriptor_number)
 
Tagged< FieldTypeGetFieldType (PtrComprCageBase cage_base, InternalIndex descriptor_number)
 
bool IsInitializedDescriptor (InternalIndex descriptor_number) const
 
Tagged< NameGetSortedKey (int descriptor_number)
 
Tagged< NameGetSortedKey (PtrComprCageBase cage_base, int descriptor_number)
 
int GetSortedKeyIndex (int descriptor_number)
 
void Set (InternalIndex descriptor_number, Descriptor *desc)
 
void Set (InternalIndex descriptor_number, Tagged< Name > key, Tagged< MaybeObject > value, PropertyDetails details)
 
void Replace (InternalIndex descriptor_number, Descriptor *descriptor)
 
void GeneralizeAllFields (bool clear_constness)
 
void Append (Descriptor *desc)
 
V8_EXPORT_PRIVATE void Sort ()
 
V8_EXPORT_PRIVATE void CheckNameCollisionDuringInsertion (Descriptor *desc, uint32_t descriptor_hash, int insertion_index)
 
V8_INLINE InternalIndex Search (Tagged< Name > name, int number_of_own_descriptors, bool concurrent_search=false)
 
V8_INLINE InternalIndex Search (Tagged< Name > name, Tagged< Map > map, bool concurrent_search=false)
 
V8_INLINE InternalIndex Search (int field_offset, int number_of_own_descriptors)
 
V8_INLINE InternalIndex Search (int field_offset, Tagged< Map > map)
 
V8_INLINE InternalIndex SearchWithCache (Isolate *isolate, Tagged< Name > name, Tagged< Map > map)
 
bool IsEqualUpTo (Tagged< DescriptorArray > desc, int nof_descriptors)
 
void Initialize (Tagged< EnumCache > enum_cache, Tagged< HeapObject > undefined_value, int nof_descriptors, int slack, uint32_t raw_gc_state)
 
ObjectSlot GetFirstPointerSlot ()
 
ObjectSlot GetDescriptorSlot (int descriptor)
 
void PrintDescriptors (std::ostream &os)
 
void PrintDescriptorDetails (std::ostream &os, InternalIndex descriptor, PropertyDetails::PrintMode mode)
 
template<typename IsolateT >
Handle< DescriptorArrayAllocate (IsolateT *isolate, int nof_descriptors, int slack, AllocationType allocation)
 

Static Public Member Functions

static void InitializeOrChangeEnumCache (DirectHandle< DescriptorArray > descriptors, Isolate *isolate, DirectHandle< FixedArray > keys, DirectHandle< FixedArray > indices, AllocationType allocation_if_initialize)
 
static DirectHandle< DescriptorArrayCopyUpTo (Isolate *isolate, DirectHandle< DescriptorArray > desc, int enumeration_index, int slack=0)
 
static DirectHandle< DescriptorArrayCopyUpToAddAttributes (Isolate *isolate, DirectHandle< DescriptorArray > desc, int enumeration_index, PropertyAttributes attributes, int slack=0)
 
template<typename IsolateT >
static V8_EXPORT_PRIVATE Handle< DescriptorArrayAllocate (IsolateT *isolate, int nof_descriptors, int slack, AllocationType allocation=AllocationType::kYoung)
 
static constexpr int SizeFor (int number_of_all_descriptors)
 
static constexpr int OffsetOfDescriptorAt (int descriptor)
 
static constexpr int ToDetailsIndex (int descriptor_number)
 
static constexpr int ToKeyIndex (int descriptor_number)
 
static constexpr int ToValueIndex (int descriptor_number)
 

Static Public Attributes

static const int kNotFound = -1
 
static constexpr size_t kSizeOfRawGcState
 
static const int kEntryKeyIndex = 0
 
static const int kEntryDetailsIndex = 1
 
static const int kEntryValueIndex = 2
 
static const int kEntrySize = 3
 
static const int kEntryKeyOffset = kEntryKeyIndex * kTaggedSize
 
static const int kEntryDetailsOffset = kEntryDetailsIndex * kTaggedSize
 
static const int kEntryValueOffset = kEntryValueIndex * kTaggedSize
 

Private Member Functions

void SetKey (InternalIndex descriptor_number, Tagged< Name > key)
 
void SetValue (InternalIndex descriptor_number, Tagged< MaybeObject > value)
 
void SetDetails (InternalIndex descriptor_number, PropertyDetails details)
 
V8_INLINE InternalIndex BinarySearch (Tagged< Name > name, int number_of_own_descriptors)
 
V8_INLINE InternalIndex LinearSearch (Tagged< Name > name, int number_of_own_descriptors)
 
void CopyFrom (InternalIndex index, Tagged< DescriptorArray > src)
 
void SetSortedKey (int pointer, int descriptor_number)
 
void SwapSortedKeys (int first, int second)
 

Detailed Description

Definition at line 54 of file descriptor-array.h.

Member Typedef Documentation

◆ EntryDetailsField

◆ EntryKeyField

◆ EntryValueField

Member Function Documentation

◆ Allocate() [1/2]

template<typename IsolateT >
Handle< DescriptorArray > v8::internal::DescriptorArray::Allocate ( IsolateT * isolate,
int nof_descriptors,
int slack,
AllocationType allocation )

Definition at line 3873 of file objects.cc.

◆ Allocate() [2/2]

template<typename IsolateT >
static V8_EXPORT_PRIVATE Handle< DescriptorArray > v8::internal::DescriptorArray::Allocate ( IsolateT * isolate,
int nof_descriptors,
int slack,
AllocationType allocation = AllocationType::kYoung )
static
Here is the caller graph for this function:

◆ Append()

void v8::internal::DescriptorArray::Append ( Descriptor * desc)
inline

Definition at line 312 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ BinarySearch()

InternalIndex v8::internal::DescriptorArray::BinarySearch ( Tagged< Name > name,
int number_of_own_descriptors )
private

Definition at line 75 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckNameCollisionDuringInsertion()

void v8::internal::DescriptorArray::CheckNameCollisionDuringInsertion ( Descriptor * desc,
uint32_t descriptor_hash,
int insertion_index )

Definition at line 3989 of file objects.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ClearEnumCache()

void v8::internal::DescriptorArray::ClearEnumCache ( )

Definition at line 3904 of file objects.cc.

Here is the call graph for this function:

◆ CopyEnumCacheFrom()

void v8::internal::DescriptorArray::CopyEnumCacheFrom ( Tagged< DescriptorArray > array)
inline

Definition at line 52 of file descriptor-array-inl.h.

◆ CopyFrom()

void v8::internal::DescriptorArray::CopyFrom ( InternalIndex index,
Tagged< DescriptorArray > src )
private

Definition at line 3929 of file objects.cc.

Here is the call graph for this function:

◆ CopyUpTo()

DirectHandle< DescriptorArray > v8::internal::DescriptorArray::CopyUpTo ( Isolate * isolate,
DirectHandle< DescriptorArray > desc,
int enumeration_index,
int slack = 0 )
static

Definition at line 3704 of file objects.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyUpToAddAttributes()

DirectHandle< DescriptorArray > v8::internal::DescriptorArray::CopyUpToAddAttributes ( Isolate * isolate,
DirectHandle< DescriptorArray > desc,
int enumeration_index,
PropertyAttributes attributes,
int slack = 0 )
static

Definition at line 3711 of file objects.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GeneralizeAllFields()

void v8::internal::DescriptorArray::GeneralizeAllFields ( bool clear_constness)

Definition at line 2238 of file objects.cc.

Here is the call graph for this function:

◆ GetDescriptorSlot()

ObjectSlot v8::internal::DescriptorArray::GetDescriptorSlot ( int descriptor)
inline

Definition at line 175 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDetails()

PropertyDetails v8::internal::DescriptorArray::GetDetails ( InternalIndex descriptor_number)
inline

Definition at line 266 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFieldIndex()

int v8::internal::DescriptorArray::GetFieldIndex ( InternalIndex descriptor_number)
inline

Definition at line 280 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ GetFieldType() [1/2]

Tagged< FieldType > v8::internal::DescriptorArray::GetFieldType ( InternalIndex descriptor_number)
inline

Definition at line 285 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFieldType() [2/2]

Tagged< FieldType > v8::internal::DescriptorArray::GetFieldType ( PtrComprCageBase cage_base,
InternalIndex descriptor_number )
inline

Definition at line 291 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ GetFirstPointerSlot()

ObjectSlot v8::internal::DescriptorArray::GetFirstPointerSlot ( )
inline

Definition at line 167 of file descriptor-array-inl.h.

◆ GetKey() [1/2]

Tagged< Name > v8::internal::DescriptorArray::GetKey ( InternalIndex descriptor_number) const
inline

Definition at line 195 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetKey() [2/2]

Tagged< Name > v8::internal::DescriptorArray::GetKey ( PtrComprCageBase cage_base,
InternalIndex descriptor_number ) const
inline

Definition at line 200 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ GetSortedKey() [1/2]

Tagged< Name > v8::internal::DescriptorArray::GetSortedKey ( int descriptor_number)
inline

Definition at line 220 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetSortedKey() [2/2]

Tagged< Name > v8::internal::DescriptorArray::GetSortedKey ( PtrComprCageBase cage_base,
int descriptor_number )
inline

Definition at line 225 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ GetSortedKeyIndex()

int v8::internal::DescriptorArray::GetSortedKeyIndex ( int descriptor_number)
inline

Definition at line 216 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStrongValue() [1/2]

Tagged< Object > v8::internal::DescriptorArray::GetStrongValue ( InternalIndex descriptor_number)
inline

Definition at line 235 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetStrongValue() [2/2]

Tagged< Object > v8::internal::DescriptorArray::GetStrongValue ( PtrComprCageBase cage_base,
InternalIndex descriptor_number )
inline

Definition at line 241 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ GetValue() [1/2]

Tagged< MaybeObject > v8::internal::DescriptorArray::GetValue ( InternalIndex descriptor_number)
inline

Definition at line 254 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetValue() [2/2]

Tagged< MaybeObject > v8::internal::DescriptorArray::GetValue ( PtrComprCageBase cage_base,
InternalIndex descriptor_number )
inline

Definition at line 259 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ Initialize()

void v8::internal::DescriptorArray::Initialize ( Tagged< EnumCache > enum_cache,
Tagged< HeapObject > undefined_value,
int nof_descriptors,
int slack,
uint32_t raw_gc_state )

Definition at line 3889 of file objects.cc.

Here is the call graph for this function:

◆ InitializeOrChangeEnumCache()

void v8::internal::DescriptorArray::InitializeOrChangeEnumCache ( DirectHandle< DescriptorArray > descriptors,
Isolate * isolate,
DirectHandle< FixedArray > keys,
DirectHandle< FixedArray > indices,
AllocationType allocation_if_initialize )
static

Definition at line 3914 of file objects.cc.

Here is the caller graph for this function:

◆ IsEqualUpTo()

bool v8::internal::DescriptorArray::IsEqualUpTo ( Tagged< DescriptorArray > desc,
int nof_descriptors )

Definition at line 3757 of file objects.cc.

Here is the call graph for this function:

◆ IsInitializedDescriptor()

bool v8::internal::DescriptorArray::IsInitializedDescriptor ( InternalIndex descriptor_number) const
inline

Definition at line 182 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ LinearSearch()

InternalIndex v8::internal::DescriptorArray::LinearSearch ( Tagged< Name > name,
int number_of_own_descriptors )
private

Definition at line 111 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ number_of_entries()

int v8::internal::DescriptorArray::number_of_entries ( ) const
inline

Definition at line 48 of file descriptor-array-inl.h.

◆ number_of_slack_descriptors()

kNumberOfDescriptorsOffset int16_t v8::internal::DescriptorArray::number_of_slack_descriptors ( ) const
inline

Definition at line 44 of file descriptor-array-inl.h.

◆ OffsetOfDescriptorAt()

static constexpr int v8::internal::DescriptorArray::OffsetOfDescriptorAt ( int descriptor)
inlinestaticconstexpr

Definition at line 174 of file descriptor-array.h.

Here is the caller graph for this function:

◆ PrintDescriptorDetails()

void v8::internal::DescriptorArray::PrintDescriptorDetails ( std::ostream & os,
InternalIndex descriptor,
PropertyDetails::PrintMode mode )

Definition at line 3989 of file objects-printer.cc.

Here is the call graph for this function:

◆ PrintDescriptors()

void v8::internal::DescriptorArray::PrintDescriptors ( std::ostream & os)

Definition at line 3974 of file objects-printer.cc.

Here is the call graph for this function:

◆ Replace()

void v8::internal::DescriptorArray::Replace ( InternalIndex descriptor_number,
Descriptor * descriptor )

Definition at line 3908 of file objects.cc.

Here is the call graph for this function:

◆ Search() [1/4]

InternalIndex v8::internal::DescriptorArray::Search ( int field_offset,
int number_of_own_descriptors )

Definition at line 129 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ Search() [2/4]

InternalIndex v8::internal::DescriptorArray::Search ( int field_offset,
Tagged< Map > map )

Definition at line 142 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ Search() [3/4]

InternalIndex v8::internal::DescriptorArray::Search ( Tagged< Name > name,
int number_of_own_descriptors,
bool concurrent_search = false )

Definition at line 56 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Search() [4/4]

InternalIndex v8::internal::DescriptorArray::Search ( Tagged< Name > name,
Tagged< Map > map,
bool concurrent_search = false )

Definition at line 121 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ SearchWithCache()

InternalIndex v8::internal::DescriptorArray::SearchWithCache ( Isolate * isolate,
Tagged< Name > name,
Tagged< Map > map )

Definition at line 148 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ Set() [1/2]

void v8::internal::DescriptorArray::Set ( InternalIndex descriptor_number,
Descriptor * desc )
inline

Definition at line 306 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Set() [2/2]

void v8::internal::DescriptorArray::Set ( InternalIndex descriptor_number,
Tagged< Name > key,
Tagged< MaybeObject > value,
PropertyDetails details )
inline

Definition at line 298 of file descriptor-array-inl.h.

Here is the call graph for this function:

◆ SetDetails()

void v8::internal::DescriptorArray::SetDetails ( InternalIndex descriptor_number,
PropertyDetails details )
inlineprivate

Definition at line 273 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetKey()

void v8::internal::DescriptorArray::SetKey ( InternalIndex descriptor_number,
Tagged< Name > key )
inlineprivate

Definition at line 208 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSortedKey()

void v8::internal::DescriptorArray::SetSortedKey ( int pointer,
int descriptor_number )
inlineprivate

Definition at line 230 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetValue()

void v8::internal::DescriptorArray::SetValue ( InternalIndex descriptor_number,
Tagged< MaybeObject > value )
inlineprivate

Definition at line 246 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SizeFor()

static constexpr int v8::internal::DescriptorArray::SizeFor ( int number_of_all_descriptors)
inlinestaticconstexpr

Definition at line 171 of file descriptor-array.h.

Here is the caller graph for this function:

◆ Sort()

void v8::internal::DescriptorArray::Sort ( )

Definition at line 3935 of file objects.cc.

Here is the call graph for this function:

◆ SwapSortedKeys()

void v8::internal::DescriptorArray::SwapSortedKeys ( int first,
int second )
inlineprivate

Definition at line 339 of file descriptor-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToDetailsIndex()

static constexpr int v8::internal::DescriptorArray::ToDetailsIndex ( int descriptor_number)
inlinestaticconstexpr

Definition at line 215 of file descriptor-array.h.

Here is the caller graph for this function:

◆ ToKeyIndex()

static constexpr int v8::internal::DescriptorArray::ToKeyIndex ( int descriptor_number)
inlinestaticconstexpr

Definition at line 220 of file descriptor-array.h.

Here is the caller graph for this function:

◆ ToValueIndex()

static constexpr int v8::internal::DescriptorArray::ToValueIndex ( int descriptor_number)
inlinestaticconstexpr

Definition at line 224 of file descriptor-array.h.

Here is the caller graph for this function:

Member Data Documentation

◆ kEntryDetailsIndex

const int v8::internal::DescriptorArray::kEntryDetailsIndex = 1
static

Definition at line 191 of file descriptor-array.h.

◆ kEntryDetailsOffset

const int v8::internal::DescriptorArray::kEntryDetailsOffset = kEntryDetailsIndex * kTaggedSize
static

Definition at line 196 of file descriptor-array.h.

◆ kEntryKeyIndex

const int v8::internal::DescriptorArray::kEntryKeyIndex = 0
static

Definition at line 190 of file descriptor-array.h.

◆ kEntryKeyOffset

const int v8::internal::DescriptorArray::kEntryKeyOffset = kEntryKeyIndex * kTaggedSize
static

Definition at line 195 of file descriptor-array.h.

◆ kEntrySize

const int v8::internal::DescriptorArray::kEntrySize = 3
static

Definition at line 193 of file descriptor-array.h.

◆ kEntryValueIndex

const int v8::internal::DescriptorArray::kEntryValueIndex = 2
static

Definition at line 192 of file descriptor-array.h.

◆ kEntryValueOffset

const int v8::internal::DescriptorArray::kEntryValueOffset = kEntryValueIndex * kTaggedSize
static

Definition at line 197 of file descriptor-array.h.

◆ kNotFound

const int v8::internal::DescriptorArray::kNotFound = -1
static

Definition at line 161 of file descriptor-array.h.

◆ kSizeOfRawGcState

size_t v8::internal::DescriptorArray::kSizeOfRawGcState
staticconstexpr
Initial value:
=
kRawGcStateOffsetEnd - kRawGcStateOffset + 1

Definition at line 168 of file descriptor-array.h.


The documentation for this class was generated from the following files: