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

#include <transitions.h>

Inheritance diagram for v8::internal::TransitionArray:
Collaboration diagram for v8::internal::TransitionArray:

Public Member Functions

int number_of_transitions () const
 
Tagged< WeakFixedArrayGetPrototypeTransitions ()
 
bool HasPrototypeTransitions ()
 
void SetKey (int transition_number, Tagged< Name > value)
 
Tagged< NameGetKey (int transition_number)
 
HeapObjectSlot GetKeySlot (int transition_number)
 
Tagged< MapGetTarget (int transition_number)
 
void SetRawTarget (int transition_number, Tagged< MaybeObject > target)
 
Tagged< MaybeObjectGetRawTarget (int transition_number)
 
HeapObjectSlot GetTargetSlot (int transition_number)
 
bool GetTargetIfExists (int transition_number, Isolate *isolate, Tagged< Map > *target)
 
V8_EXPORT_PRIVATE void Sort ()
 
void PrintInternal (std::ostream &os)
 
int SearchNameForTesting (Tagged< Name > name, int *out_insertion_index=nullptr)
 
Tagged< MapSearchAndGetTargetForTesting (PropertyKind kind, Tagged< Name > name, PropertyAttributes attributes)
 
bool HasSideStepTransitions ()
 
- Public Member Functions inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
Tagged< ElementTget (int index) const
 
Tagged< ElementTget (int index, RelaxedLoadTag) const
 
Tagged< ElementTget (int index, AcquireLoadTag) const
 
Tagged< ElementTget (int index, SeqCstAccessTag) const
 
void set (int index, Tagged< ElementT > value, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value)
 
void set (int index, Tagged< ElementT > value, RelaxedStoreTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, RelaxedStoreTag)
 
void set (int index, Tagged< ElementT > value, ReleaseStoreTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, ReleaseStoreTag)
 
void set (int index, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, SeqCstAccessTag)
 
Tagged< ElementTswap (int index, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
Tagged< ElementTcompare_and_swap (int index, Tagged< ElementT > expected, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
void RightTrim (Isolate *isolate, int new_capacity)
 
int AllocatedSize () const
 
SlotType RawFieldOfFirstElement () const
 
SlotType RawFieldOfElementAt (int index) const
 
Handle< DAllocate (IsolateT *isolate, int capacity, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation)
 

Static Public Member Functions

static int ToKeyIndex (int transition_number)
 
static int ToTargetIndex (int transition_number)
 
static void CreateSideStepTransitions (Isolate *isolate, DirectHandle< TransitionArray > transitions)
 
- Static Public Member Functions inherited from v8::internal::WeakFixedArray
template<class IsolateT >
static Handle< WeakFixedArrayNew (IsolateT *isolate, int capacity, AllocationType allocation=AllocationType::kYoung, MaybeDirectHandle< Object > initial_value={})
 
- Static Public Member Functions inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
static void MoveElements (Isolate *isolate, Tagged< WeakFixedArray > dst, int dst_index, Tagged< WeakFixedArray > src, int src_index, int len, WriteBarrierMode mode=kDefaultMode)
 
static void CopyElements (Isolate *isolate, Tagged< WeakFixedArray > dst, int dst_index, Tagged< WeakFixedArray > src, int src_index, int len, WriteBarrierMode mode=kDefaultMode)
 
static constexpr int SizeFor (int capacity)
 
static constexpr int OffsetOfElementAt (int index)
 

Static Public Attributes

static constexpr int kNotFound = -1
 
static const int kPrototypeTransitionsIndex = 0
 
static const int kSideStepTransitionsIndex = 1
 
static const int kTransitionLengthIndex = 2
 
static const int kFirstIndex = 3
 
static const int kEntryKeyIndex = 0
 
static const int kEntryTargetIndex = 1
 
static const int kEntrySize = 2
 
- Static Public Attributes inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
static constexpr bool kElementsAreMaybeObject
 
static constexpr int kElementSize
 
static constexpr int kMaxCapacity
 
static constexpr int kMaxRegularCapacity
 

Private Member Functions

void SetNumberOfTransitions (int number_of_transitions)
 
int Capacity ()
 
void SetPrototypeTransitions (Tagged< WeakFixedArray > prototype_transitions)
 
int Search (PropertyKind kind, Tagged< Name > name, PropertyAttributes attributes, int *out_insertion_index=nullptr)
 
V8_EXPORT_PRIVATE Tagged< MapSearchAndGetTarget (PropertyKind kind, Tagged< Name > name, PropertyAttributes attributes)
 
int SearchSpecial (Tagged< Symbol > symbol, bool concurrent_search=false, int *out_insertion_index=nullptr)
 
int SearchName (Tagged< Name > name, bool concurrent_search=false, int *out_insertion_index=nullptr)
 
int SearchDetails (int transition, PropertyKind kind, PropertyAttributes attributes, int *out_insertion_index)
 
Tagged< MapSearchDetailsAndGetTarget (int transition, PropertyKind kind, PropertyAttributes attributes)
 
int LinearSearchName (Tagged< Name > name, int *out_insertion_index)
 
int BinarySearchName (Tagged< Name > name, int *out_insertion_index)
 
void ForEachTransitionTo (Tagged< Name > name, const ForEachTransitionCallback &callback)
 
void Set (int transition_number, Tagged< Name > key, Tagged< MaybeObject > target)
 
Tagged< WeakFixedArrayGetSideStepTransitions ()
 
void SetSideStepTransitions (Tagged< WeakFixedArray > transitions)
 

Static Private Member Functions

static int NumberOfPrototypeTransitions (Tagged< WeakFixedArray > proto_transitions)
 
static void SetNumberOfPrototypeTransitions (Tagged< WeakFixedArray > proto_transitions, int value)
 
static int LengthFor (int number_of_transitions)
 
static bool CompactPrototypeTransitionArray (Isolate *isolate, Tagged< WeakFixedArray > array)
 
static DirectHandle< WeakFixedArrayGrowPrototypeTransitionArray (DirectHandle< WeakFixedArray > array, int new_capacity, Isolate *isolate)
 
static int CompareKeys (Tagged< Name > key1, uint32_t hash1, PropertyKind kind1, PropertyAttributes attributes1, Tagged< Name > key2, uint32_t hash2, PropertyKind kind2, PropertyAttributes attributes2)
 
static int CompareNames (Tagged< Name > key1, uint32_t hash1, Tagged< Name > key2, uint32_t hash2)
 
static int CompareDetails (PropertyKind kind1, PropertyAttributes attributes1, PropertyKind kind2, PropertyAttributes attributes2)
 

Static Private Attributes

static const int kProtoTransitionHeaderSize = 1
 
static const int kMaxCachedPrototypeTransitions = 256
 
static const int kProtoTransitionNumberOfEntriesOffset = 0
 

Friends

class Factory
 
class MarkCompactCollector
 
class TransitionsAccessor
 

Additional Inherited Members

- Public Types inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
using Header
 
using Shape
 
- Protected Member Functions inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
bool IsInBounds (int index) const
 
bool IsCowArray () const
 
 FLEXIBLE_ARRAY_MEMBER (ElementMemberT, objects)
 
- Static Protected Member Functions inherited from v8::internal::TaggedArrayBase< WeakFixedArray, WeakFixedArrayShape >
static Handle< WeakFixedArrayAllocate (IsolateT *isolate, int capacity, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation=AllocationType::kYoung)
 
static constexpr int NewCapacityForIndex (int index, int old_capacity)
 

Detailed Description

Definition at line 317 of file transitions.h.

Member Function Documentation

◆ BinarySearchName()

int v8::internal::TransitionArray::BinarySearchName ( Tagged< Name > name,
int * out_insertion_index )
inlineprivate

Definition at line 284 of file transitions-inl.h.

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

◆ Capacity()

int v8::internal::TransitionArray::Capacity ( )
inlineprivate

Definition at line 460 of file transitions-inl.h.

Here is the caller graph for this function:

◆ CompactPrototypeTransitionArray()

bool v8::internal::TransitionArray::CompactPrototypeTransitionArray ( Isolate * isolate,
Tagged< WeakFixedArray > array )
staticprivate

Definition at line 342 of file transitions.cc.

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

◆ CompareDetails()

int v8::internal::TransitionArray::CompareDetails ( PropertyKind kind1,
PropertyAttributes attributes1,
PropertyKind kind2,
PropertyAttributes attributes2 )
inlinestaticprivate

Definition at line 438 of file transitions-inl.h.

Here is the caller graph for this function:

◆ CompareKeys()

int v8::internal::TransitionArray::CompareKeys ( Tagged< Name > key1,
uint32_t hash1,
PropertyKind kind1,
PropertyAttributes attributes1,
Tagged< Name > key2,
uint32_t hash2,
PropertyKind kind2,
PropertyAttributes attributes2 )
inlinestaticprivate

Definition at line 416 of file transitions-inl.h.

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

◆ CompareNames()

int v8::internal::TransitionArray::CompareNames ( Tagged< Name > key1,
uint32_t hash1,
Tagged< Name > key2,
uint32_t hash2 )
inlinestaticprivate

Definition at line 428 of file transitions-inl.h.

Here is the caller graph for this function:

◆ CreateSideStepTransitions()

void v8::internal::TransitionArray::CreateSideStepTransitions ( Isolate * isolate,
DirectHandle< TransitionArray > transitions )
static

Definition at line 856 of file transitions.cc.

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

◆ ForEachTransitionTo()

void v8::internal::TransitionArray::ForEachTransitionTo ( Tagged< Name > name,
const ForEachTransitionCallback & callback )
private

Definition at line 763 of file transitions.cc.

Here is the call graph for this function:

◆ GetKey()

Tagged< Name > v8::internal::TransitionArray::GetKey ( int transition_number)
inline

Definition at line 129 of file transitions-inl.h.

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

◆ GetKeySlot()

HeapObjectSlot v8::internal::TransitionArray::GetKeySlot ( int transition_number)
inline

Definition at line 110 of file transitions-inl.h.

Here is the call graph for this function:

◆ GetPrototypeTransitions()

Tagged< WeakFixedArray > v8::internal::TransitionArray::GetPrototypeTransitions ( )
inline

Definition at line 49 of file transitions-inl.h.

Here is the call graph for this function:

◆ GetRawTarget()

Tagged< MaybeObject > v8::internal::TransitionArray::GetRawTarget ( int transition_number)
inline

Definition at line 191 of file transitions-inl.h.

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

◆ GetSideStepTransitions()

Tagged< WeakFixedArray > v8::internal::TransitionArray::GetSideStepTransitions ( )
inlineprivate

Definition at line 97 of file transitions-inl.h.

Here is the call graph for this function:

◆ GetTarget()

Tagged< Map > v8::internal::TransitionArray::GetTarget ( int transition_number)
inline

Definition at line 196 of file transitions-inl.h.

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

◆ GetTargetIfExists()

bool v8::internal::TransitionArray::GetTargetIfExists ( int transition_number,
Isolate * isolate,
Tagged< Map > * target )
inline

Definition at line 225 of file transitions-inl.h.

Here is the call graph for this function:

◆ GetTargetSlot()

HeapObjectSlot v8::internal::TransitionArray::GetTargetSlot ( int transition_number)
inline

Definition at line 157 of file transitions-inl.h.

Here is the call graph for this function:

◆ GrowPrototypeTransitionArray()

DirectHandle< WeakFixedArray > v8::internal::TransitionArray::GrowPrototypeTransitionArray ( DirectHandle< WeakFixedArray > array,
int new_capacity,
Isolate * isolate )
staticprivate

Definition at line 374 of file transitions.cc.

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

◆ HasPrototypeTransitions()

bool v8::internal::TransitionArray::HasPrototypeTransitions ( )
inline

Definition at line 45 of file transitions-inl.h.

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

◆ HasSideStepTransitions()

bool v8::internal::TransitionArray::HasSideStepTransitions ( )
inline

Definition at line 56 of file transitions-inl.h.

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

◆ LengthFor()

static int v8::internal::TransitionArray::LengthFor ( int number_of_transitions)
inlinestaticprivate

Definition at line 409 of file transitions.h.

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

◆ LinearSearchName()

int v8::internal::TransitionArray::LinearSearchName ( Tagged< Name > name,
int * out_insertion_index )
inlineprivate

Definition at line 319 of file transitions-inl.h.

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

◆ number_of_transitions()

int v8::internal::TransitionArray::number_of_transitions ( ) const
inline

Definition at line 411 of file transitions-inl.h.

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

◆ NumberOfPrototypeTransitions()

int v8::internal::TransitionArray::NumberOfPrototypeTransitions ( Tagged< WeakFixedArray > proto_transitions)
inlinestaticprivate

Definition at line 121 of file transitions-inl.h.

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

◆ PrintInternal()

void v8::internal::TransitionArray::PrintInternal ( std::ostream & os)

◆ Search()

int v8::internal::TransitionArray::Search ( PropertyKind kind,
Tagged< Name > name,
PropertyAttributes attributes,
int * out_insertion_index = nullptr )
private

Definition at line 745 of file transitions.cc.

Here is the call graph for this function:

◆ SearchAndGetTarget()

Tagged< Map > v8::internal::TransitionArray::SearchAndGetTarget ( PropertyKind kind,
Tagged< Name > name,
PropertyAttributes attributes )
private

Definition at line 753 of file transitions.cc.

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

◆ SearchAndGetTargetForTesting()

Tagged< Map > v8::internal::TransitionArray::SearchAndGetTargetForTesting ( PropertyKind kind,
Tagged< Name > name,
PropertyAttributes attributes )
inline

Definition at line 250 of file transitions-inl.h.

Here is the call graph for this function:

◆ SearchDetails()

int v8::internal::TransitionArray::SearchDetails ( int transition,
PropertyKind kind,
PropertyAttributes attributes,
int * out_insertion_index )
private

Definition at line 699 of file transitions.cc.

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

◆ SearchDetailsAndGetTarget()

Tagged< Map > v8::internal::TransitionArray::SearchDetailsAndGetTarget ( int transition,
PropertyKind kind,
PropertyAttributes attributes )
private

Definition at line 723 of file transitions.cc.

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

◆ SearchName()

int v8::internal::TransitionArray::SearchName ( Tagged< Name > name,
bool concurrent_search = false,
int * out_insertion_index = nullptr )
inlineprivate

Definition at line 261 of file transitions-inl.h.

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

◆ SearchNameForTesting()

int v8::internal::TransitionArray::SearchNameForTesting ( Tagged< Name > name,
int * out_insertion_index = nullptr )
inline

Definition at line 245 of file transitions-inl.h.

Here is the call graph for this function:

◆ SearchSpecial()

int v8::internal::TransitionArray::SearchSpecial ( Tagged< Symbol > symbol,
bool concurrent_search = false,
int * out_insertion_index = nullptr )
inlineprivate

Definition at line 255 of file transitions-inl.h.

Here is the call graph for this function:

◆ Set()

void v8::internal::TransitionArray::Set ( int transition_number,
Tagged< Name > key,
Tagged< MaybeObject > target )
inlineprivate

Definition at line 454 of file transitions-inl.h.

Here is the call graph for this function:

◆ SetKey()

void v8::internal::TransitionArray::SetKey ( int transition_number,
Tagged< Name > value )
inline

Definition at line 152 of file transitions-inl.h.

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

◆ SetNumberOfPrototypeTransitions()

void v8::internal::TransitionArray::SetNumberOfPrototypeTransitions ( Tagged< WeakFixedArray > proto_transitions,
int value )
staticprivate

Definition at line 496 of file transitions.cc.

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

◆ SetNumberOfTransitions()

void v8::internal::TransitionArray::SetNumberOfTransitions ( int number_of_transitions)
inlineprivate

Definition at line 465 of file transitions-inl.h.

Here is the call graph for this function:

◆ SetPrototypeTransitions()

void v8::internal::TransitionArray::SetPrototypeTransitions ( Tagged< WeakFixedArray > prototype_transitions)
inlineprivate

Definition at line 115 of file transitions-inl.h.

Here is the call graph for this function:

◆ SetRawTarget()

void v8::internal::TransitionArray::SetRawTarget ( int transition_number,
Tagged< MaybeObject > target )
inline

Definition at line 216 of file transitions-inl.h.

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

◆ SetSideStepTransitions()

void v8::internal::TransitionArray::SetSideStepTransitions ( Tagged< WeakFixedArray > transitions)
inlineprivate

Definition at line 104 of file transitions-inl.h.

Here is the call graph for this function:

◆ Sort()

void v8::internal::TransitionArray::Sort ( )

Definition at line 778 of file transitions.cc.

Here is the call graph for this function:

◆ ToKeyIndex()

static int v8::internal::TransitionArray::ToKeyIndex ( int transition_number)
inlinestatic

Definition at line 361 of file transitions.h.

Here is the caller graph for this function:

◆ ToTargetIndex()

static int v8::internal::TransitionArray::ToTargetIndex ( int transition_number)
inlinestatic

Definition at line 365 of file transitions.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ Factory

friend class Factory
friend

Definition at line 381 of file transitions.h.

◆ MarkCompactCollector

friend class MarkCompactCollector
friend

Definition at line 382 of file transitions.h.

◆ TransitionsAccessor

friend class TransitionsAccessor
friend

Definition at line 383 of file transitions.h.

Member Data Documentation

◆ kEntryKeyIndex

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

Definition at line 356 of file transitions.h.

◆ kEntrySize

const int v8::internal::TransitionArray::kEntrySize = 2
static

Definition at line 358 of file transitions.h.

◆ kEntryTargetIndex

const int v8::internal::TransitionArray::kEntryTargetIndex = 1
static

Definition at line 357 of file transitions.h.

◆ kFirstIndex

const int v8::internal::TransitionArray::kFirstIndex = 3
static

Definition at line 353 of file transitions.h.

◆ kMaxCachedPrototypeTransitions

const int v8::internal::TransitionArray::kMaxCachedPrototypeTransitions = 256
staticprivate

Definition at line 394 of file transitions.h.

◆ kNotFound

int v8::internal::TransitionArray::kNotFound = -1
staticconstexpr

Definition at line 336 of file transitions.h.

◆ kProtoTransitionHeaderSize

const int v8::internal::TransitionArray::kProtoTransitionHeaderSize = 1
staticprivate

Definition at line 393 of file transitions.h.

◆ kProtoTransitionNumberOfEntriesOffset

const int v8::internal::TransitionArray::kProtoTransitionNumberOfEntriesOffset = 0
staticprivate

Definition at line 404 of file transitions.h.

◆ kPrototypeTransitionsIndex

const int v8::internal::TransitionArray::kPrototypeTransitionsIndex = 0
static

Definition at line 350 of file transitions.h.

◆ kSideStepTransitionsIndex

const int v8::internal::TransitionArray::kSideStepTransitionsIndex = 1
static

Definition at line 351 of file transitions.h.

◆ kTransitionLengthIndex

const int v8::internal::TransitionArray::kTransitionLengthIndex = 2
static

Definition at line 352 of file transitions.h.


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