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

#include <transitions.h>

Collaboration diagram for v8::internal::TransitionsAccessor:

Public Types

using TraverseCallback = std::function<void(Tagged<Map>)>
 

Public Member Functions

 TransitionsAccessor (Isolate *isolate, Tagged< Map > map, bool concurrent_access=false)
 
Tagged< MapSearchTransition (Tagged< Name > name, PropertyKind kind, PropertyAttributes attributes)
 
Tagged< MapSearchSpecial (Tagged< Symbol > name)
 
MaybeHandle< MapFindTransitionToField (DirectHandle< String > name)
 
void ForEachTransitionTo (Tagged< Name > name, const ForEachTransitionCallback &callback, DisallowGarbageCollection *no_gc)
 
template<typename Char >
bool IsExpectedTransition (Tagged< Name > transition_name, Tagged< Map > transition_target, base::Vector< const Char > key_chars)
 
template<typename Char >
std::pair< Handle< String >, Handle< Map > > ExpectedTransition (base::Vector< const Char > key_chars)
 
template<typename Callback , typename ProtoCallback , typename SideStepCallback >
void ForEachTransition (DisallowGarbageCollection *no_gc, Callback callback, ProtoCallback proto_transition_callback, SideStepCallback side_step_transition_callback)
 
template<typename Callback , typename ProtoCallback , typename SideStepCallback , bool with_key = true>
void ForEachTransitionWithKey (DisallowGarbageCollection *no_gc, Callback callback, ProtoCallback proto_transition_callback, SideStepCallback side_step_transition_callback)
 
int NumberOfTransitions ()
 
Tagged< NameGetKey (int transition_number)
 
Tagged< MapGetTarget (int transition_number)
 
bool HasIntegrityLevelTransitionTo (Tagged< Map > to, Tagged< Symbol > *out_symbol=nullptr, PropertyAttributes *out_integrity_level=nullptr)
 
void TraverseTransitionTree (const TraverseCallback &callback)
 
bool HasPrototypeTransitions ()
 
Tagged< MapGetMigrationTarget ()
 
bool HasSideStepTransitions ()
 
Tagged< ObjectGetSideStepTransition (SideStepTransition::Kind i)
 
void SetSideStepTransition (SideStepTransition::Kind i, Tagged< Object > target)
 

Static Public Member Functions

static void Insert (Isolate *isolate, DirectHandle< Map > map, DirectHandle< Name > name, DirectHandle< Map > target, TransitionKindFlag flag)
 
static void InsertNoneSentinel (Isolate *isolate, DirectHandle< Map > map, DirectHandle< Name > name)
 
static MaybeHandle< MapSearchTransition (Isolate *isolate, DirectHandle< Map > map, Tagged< Name > name, PropertyKind kind, PropertyAttributes attributes)
 
static MaybeHandle< MapSearchSpecial (Isolate *isolate, DirectHandle< Map > map, Tagged< Symbol > name)
 
static bool IsSpecialTransition (ReadOnlyRoots roots, Tagged< Name > name)
 
static PropertyDetails GetTargetDetails (Tagged< Name > name, Tagged< Map > target)
 
static bool CanHaveMoreTransitions (Isolate *isolate, DirectHandle< Map > map)
 
static bool IsMatchingMap (Tagged< Map > target, Tagged< Name > name, PropertyKind kind, PropertyAttributes attributes)
 
static bool PutPrototypeTransition (Isolate *isolate, DirectHandle< Map >, DirectHandle< Object > prototype, DirectHandle< Map > target_map)
 
static std::optional< Tagged< Map > > GetPrototypeTransition (Isolate *isolate, Tagged< Map > map, Tagged< Object > prototype)
 
static void SetMigrationTarget (Isolate *isolate, DirectHandle< Map > map, Tagged< Map > migration_target)
 
static void EnsureHasSideStepTransitions (Isolate *isolate, DirectHandle< Map > map)
 

Static Public Attributes

static const int kMaxNumberOfTransitions = 1024 + 512
 

Protected Types

enum  Encoding {
  kPrototypeInfo , kUninitialized , kMigrationTarget , kWeakRef ,
  kFullTransitionArray
}
 

Protected Member Functions

Encoding encoding ()
 
int Capacity ()
 
Tagged< TransitionArraytransitions ()
 

Private Member Functions

PropertyDetails GetSimpleTargetDetails (Tagged< Map > transition)
 
bool HasSimpleTransitionTo (Tagged< Map > map)
 
Tagged< MapGetTargetMapFromWeakRef ()
 
void TraverseTransitionTreeInternal (const TraverseCallback &callback, DisallowGarbageCollection *no_gc)
 
 DISALLOW_IMPLICIT_CONSTRUCTORS (TransitionsAccessor)
 

Static Private Member Functions

static Encoding GetEncoding (Isolate *isolate, Tagged< MaybeObject > raw_transitions)
 
static Encoding GetEncoding (Isolate *isolate, Tagged< TransitionArray > array)
 
static Encoding GetEncoding (Isolate *isolate, DirectHandle< Map > map)
 
static Tagged< TransitionArrayGetTransitionArray (Isolate *isolate, Tagged< MaybeObject > raw_transitions)
 
static Tagged< TransitionArrayGetTransitionArray (Isolate *isolate, DirectHandle< Map > map)
 
static Tagged< MapGetSimpleTransition (Isolate *isolate, DirectHandle< Map > map)
 
static Tagged< NameGetSimpleTransitionKey (Tagged< Map > transition)
 
static Tagged< MapGetTargetFromRaw (Tagged< MaybeObject > raw)
 
static void EnsureHasFullTransitionArray (Isolate *isolate, DirectHandle< Map > map)
 
static void SetPrototypeTransitions (Isolate *isolate, DirectHandle< Map > map, DirectHandle< WeakFixedArray > proto_transitions)
 
static Tagged< WeakFixedArrayGetPrototypeTransitions (Isolate *isolate, Tagged< Map > map)
 
static void InsertHelper (Isolate *isolate, DirectHandle< Map > map, DirectHandle< Name > name, DirectHandle< Map > target, TransitionKindFlag flag)
 
static void ReplaceTransitions (Isolate *isolate, DirectHandle< Map > map, Tagged< UnionOf< TransitionArray, MaybeWeak< Map > > > new_transitions)
 
static void ReplaceTransitions (Isolate *isolate, DirectHandle< Map > map, DirectHandle< TransitionArray > new_transitions)
 

Private Attributes

Isolateisolate_
 
Tagged< Mapmap_
 
Tagged< MaybeObjectraw_transitions_
 
Encoding encoding_
 
bool concurrent_access_
 

Friends

class MarkCompactCollector
 
class TransitionArray
 

Detailed Description

Definition at line 75 of file transitions.h.

Member Typedef Documentation

◆ TraverseCallback

Definition at line 169 of file transitions.h.

Member Enumeration Documentation

◆ Encoding

Enumerator
kPrototypeInfo 
kUninitialized 
kMigrationTarget 
kWeakRef 
kFullTransitionArray 

Definition at line 230 of file transitions.h.

Constructor & Destructor Documentation

◆ TransitionsAccessor()

v8::internal::TransitionsAccessor::TransitionsAccessor ( Isolate * isolate,
Tagged< Map > map,
bool concurrent_access = false )
inline

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

Here is the caller graph for this function:

Member Function Documentation

◆ CanHaveMoreTransitions()

bool v8::internal::TransitionsAccessor::CanHaveMoreTransitions ( Isolate * isolate,
DirectHandle< Map > map )
static

Definition at line 316 of file transitions.cc.

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

◆ Capacity()

int v8::internal::TransitionsAccessor::Capacity ( )
inlineprotected

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

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

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::internal::TransitionsAccessor::DISALLOW_IMPLICIT_CONSTRUCTORS ( TransitionsAccessor )
private

◆ encoding()

Encoding v8::internal::TransitionsAccessor::encoding ( )
inlineprotected

Definition at line 238 of file transitions.h.

Here is the caller graph for this function:

◆ EnsureHasFullTransitionArray()

void v8::internal::TransitionsAccessor::EnsureHasFullTransitionArray ( Isolate * isolate,
DirectHandle< Map > map )
staticprivate

Definition at line 581 of file transitions.cc.

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

◆ EnsureHasSideStepTransitions()

void v8::internal::TransitionsAccessor::EnsureHasSideStepTransitions ( Isolate * isolate,
DirectHandle< Map > map )
static

Definition at line 845 of file transitions.cc.

Here is the call graph for this function:

◆ ExpectedTransition()

template<typename Char >
std::pair< Handle< String >, Handle< Map > > v8::internal::TransitionsAccessor::ExpectedTransition ( base::Vector< const Char > key_chars)
inline

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

Here is the call graph for this function:

◆ FindTransitionToField()

MaybeHandle< Map > v8::internal::TransitionsAccessor::FindTransitionToField ( DirectHandle< String > name)

Definition at line 270 of file transitions.cc.

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

◆ ForEachTransition()

template<typename Callback , typename ProtoCallback , typename SideStepCallback >
void v8::internal::TransitionsAccessor::ForEachTransition ( DisallowGarbageCollection * no_gc,
Callback callback,
ProtoCallback proto_transition_callback,
SideStepCallback side_step_transition_callback )
inline

Definition at line 134 of file transitions.h.

◆ ForEachTransitionTo()

void v8::internal::TransitionsAccessor::ForEachTransitionTo ( Tagged< Name > name,
const ForEachTransitionCallback & callback,
DisallowGarbageCollection * no_gc )

Definition at line 285 of file transitions.cc.

Here is the call graph for this function:

◆ ForEachTransitionWithKey()

template<typename Callback , typename ProtoCallback , typename SideStepCallback , bool with_key>
void v8::internal::TransitionsAccessor::ForEachTransitionWithKey ( DisallowGarbageCollection * no_gc,
Callback callback,
ProtoCallback proto_transition_callback,
SideStepCallback side_step_transition_callback )

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

Here is the call graph for this function:

◆ GetEncoding() [1/3]

TransitionsAccessor::Encoding v8::internal::TransitionsAccessor::GetEncoding ( Isolate * isolate,
DirectHandle< Map > map )
inlinestaticprivate

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

Here is the call graph for this function:

◆ GetEncoding() [2/3]

TransitionsAccessor::Encoding v8::internal::TransitionsAccessor::GetEncoding ( Isolate * isolate,
Tagged< MaybeObject > raw_transitions )
inlinestaticprivate

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

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

◆ GetEncoding() [3/3]

TransitionsAccessor::Encoding v8::internal::TransitionsAccessor::GetEncoding ( Isolate * isolate,
Tagged< TransitionArray > array )
inlinestaticprivate

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

Here is the call graph for this function:

◆ GetKey()

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

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

Here is the call graph for this function:

◆ GetMigrationTarget()

Tagged< Map > v8::internal::TransitionsAccessor::GetMigrationTarget ( )

Definition at line 541 of file transitions.cc.

Here is the call graph for this function:

◆ GetPrototypeTransition()

std::optional< Tagged< Map > > v8::internal::TransitionsAccessor::GetPrototypeTransition ( Isolate * isolate,
Tagged< Map > map,
Tagged< Object > prototype )
static

Definition at line 459 of file transitions.cc.

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

◆ GetPrototypeTransitions()

Tagged< WeakFixedArray > v8::internal::TransitionsAccessor::GetPrototypeTransitions ( Isolate * isolate,
Tagged< Map > map )
staticprivate

Definition at line 480 of file transitions.cc.

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

◆ GetSideStepTransition()

Tagged< Object > v8::internal::TransitionsAccessor::GetSideStepTransition ( SideStepTransition::Kind i)
inline

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

Here is the call graph for this function:

◆ GetSimpleTargetDetails()

PropertyDetails v8::internal::TransitionsAccessor::GetSimpleTargetDetails ( Tagged< Map > transition)
inlineprivate

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

Here is the caller graph for this function:

◆ GetSimpleTransition()

Tagged< Map > v8::internal::TransitionsAccessor::GetSimpleTransition ( Isolate * isolate,
DirectHandle< Map > map )
inlinestaticprivate

Definition at line 17 of file transitions.cc.

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

◆ GetSimpleTransitionKey()

Tagged< Name > v8::internal::TransitionsAccessor::GetSimpleTransitionKey ( Tagged< Map > transition)
inlinestaticprivate

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

Here is the caller graph for this function:

◆ GetTarget()

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

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

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

◆ GetTargetDetails()

PropertyDetails v8::internal::TransitionsAccessor::GetTargetDetails ( Tagged< Name > name,
Tagged< Map > target )
inlinestatic

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

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

◆ GetTargetFromRaw()

Tagged< Map > v8::internal::TransitionsAccessor::GetTargetFromRaw ( Tagged< MaybeObject > raw)
inlinestaticprivate

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

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

◆ GetTargetMapFromWeakRef()

Tagged< Map > v8::internal::TransitionsAccessor::GetTargetMapFromWeakRef ( )
inlineprivate

◆ GetTransitionArray() [1/2]

Tagged< TransitionArray > v8::internal::TransitionsAccessor::GetTransitionArray ( Isolate * isolate,
DirectHandle< Map > map )
inlinestaticprivate

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

Here is the call graph for this function:

◆ GetTransitionArray() [2/2]

Tagged< TransitionArray > v8::internal::TransitionsAccessor::GetTransitionArray ( Isolate * isolate,
Tagged< MaybeObject > raw_transitions )
inlinestaticprivate

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

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

◆ HasIntegrityLevelTransitionTo()

bool v8::internal::TransitionsAccessor::HasIntegrityLevelTransitionTo ( Tagged< Map > to,
Tagged< Symbol > * out_symbol = nullptr,
PropertyAttributes * out_integrity_level = nullptr )

Definition at line 825 of file transitions.cc.

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

◆ HasPrototypeTransitions()

bool v8::internal::TransitionsAccessor::HasPrototypeTransitions ( )

Definition at line 517 of file transitions.cc.

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

◆ HasSideStepTransitions()

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

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

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

◆ HasSimpleTransitionTo()

bool v8::internal::TransitionsAccessor::HasSimpleTransitionTo ( Tagged< Map > map)
private

Definition at line 29 of file transitions.cc.

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

◆ Insert()

static void v8::internal::TransitionsAccessor::Insert ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< Name > name,
DirectHandle< Map > target,
TransitionKindFlag flag )
inlinestatic

Definition at line 85 of file transitions.h.

Here is the caller graph for this function:

◆ InsertHelper()

void v8::internal::TransitionsAccessor::InsertHelper ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< Name > name,
DirectHandle< Map > target,
TransitionKindFlag flag )
staticprivate

Definition at line 43 of file transitions.cc.

Here is the call graph for this function:

◆ InsertNoneSentinel()

static void v8::internal::TransitionsAccessor::InsertNoneSentinel ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< Name > name )
inlinestatic

Definition at line 90 of file transitions.h.

◆ IsExpectedTransition()

template<typename Char >
bool v8::internal::TransitionsAccessor::IsExpectedTransition ( Tagged< Name > transition_name,
Tagged< Map > transition_target,
base::Vector< const Char > key_chars )
inline

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

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

◆ IsMatchingMap()

bool v8::internal::TransitionsAccessor::IsMatchingMap ( Tagged< Map > target,
Tagged< Name > name,
PropertyKind kind,
PropertyAttributes attributes )
static

Definition at line 329 of file transitions.cc.

Here is the caller graph for this function:

◆ IsSpecialTransition()

bool v8::internal::TransitionsAccessor::IsSpecialTransition ( ReadOnlyRoots roots,
Tagged< Name > name )
static

Definition at line 261 of file transitions.cc.

Here is the caller graph for this function:

◆ NumberOfTransitions()

int v8::internal::TransitionsAccessor::NumberOfTransitions ( )

Definition at line 503 of file transitions.cc.

Here is the call graph for this function:

◆ PutPrototypeTransition()

bool v8::internal::TransitionsAccessor::PutPrototypeTransition ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< Object > prototype,
DirectHandle< Map > target_map )
static

Definition at line 392 of file transitions.cc.

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

◆ ReplaceTransitions() [1/2]

void v8::internal::TransitionsAccessor::ReplaceTransitions ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< TransitionArray > new_transitions )
inlinestaticprivate

Definition at line 565 of file transitions.cc.

Here is the call graph for this function:

◆ ReplaceTransitions() [2/2]

void v8::internal::TransitionsAccessor::ReplaceTransitions ( Isolate * isolate,
DirectHandle< Map > map,
Tagged< UnionOf< TransitionArray, MaybeWeak< Map > > > new_transitions )
inlinestaticprivate

Definition at line 549 of file transitions.cc.

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

◆ SearchSpecial() [1/2]

MaybeHandle< Map > v8::internal::TransitionsAccessor::SearchSpecial ( Isolate * isolate,
DirectHandle< Map > map,
Tagged< Symbol > name )
inlinestatic

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

Here is the call graph for this function:

◆ SearchSpecial() [2/2]

Tagged< Map > v8::internal::TransitionsAccessor::SearchSpecial ( Tagged< Symbol > name)

Definition at line 251 of file transitions.cc.

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

◆ SearchTransition() [1/2]

MaybeHandle< Map > v8::internal::TransitionsAccessor::SearchTransition ( Isolate * isolate,
DirectHandle< Map > map,
Tagged< Name > name,
PropertyKind kind,
PropertyAttributes attributes )
inlinestatic

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

Here is the call graph for this function:

◆ SearchTransition() [2/2]

Tagged< Map > v8::internal::TransitionsAccessor::SearchTransition ( Tagged< Name > name,
PropertyKind kind,
PropertyAttributes attributes )

Definition at line 229 of file transitions.cc.

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

◆ SetMigrationTarget()

void v8::internal::TransitionsAccessor::SetMigrationTarget ( Isolate * isolate,
DirectHandle< Map > map,
Tagged< Map > migration_target )
static

Definition at line 531 of file transitions.cc.

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

◆ SetPrototypeTransitions()

void v8::internal::TransitionsAccessor::SetPrototypeTransitions ( Isolate * isolate,
DirectHandle< Map > map,
DirectHandle< WeakFixedArray > proto_transitions )
staticprivate

Definition at line 572 of file transitions.cc.

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

◆ SetSideStepTransition()

void v8::internal::TransitionsAccessor::SetSideStepTransition ( SideStepTransition::Kind i,
Tagged< Object > target )
inline

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

Here is the call graph for this function:

◆ transitions()

Tagged< TransitionArray > v8::internal::TransitionsAccessor::transitions ( )
inlineprotected

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

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

◆ TraverseTransitionTree()

void v8::internal::TransitionsAccessor::TraverseTransitionTree ( const TraverseCallback & callback)
inline

Definition at line 172 of file transitions.h.

◆ TraverseTransitionTreeInternal()

void v8::internal::TransitionsAccessor::TraverseTransitionTreeInternal ( const TraverseCallback & callback,
DisallowGarbageCollection * no_gc )
private

Definition at line 606 of file transitions.cc.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ MarkCompactCollector

friend class MarkCompactCollector
friend

Definition at line 247 of file transitions.h.

◆ TransitionArray

friend class TransitionArray
friend

Definition at line 248 of file transitions.h.

Member Data Documentation

◆ concurrent_access_

bool v8::internal::TransitionsAccessor::concurrent_access_
private

Definition at line 298 of file transitions.h.

◆ encoding_

Encoding v8::internal::TransitionsAccessor::encoding_
private

Definition at line 297 of file transitions.h.

◆ isolate_

Isolate* v8::internal::TransitionsAccessor::isolate_
private

Definition at line 294 of file transitions.h.

◆ kMaxNumberOfTransitions

const int v8::internal::TransitionsAccessor::kMaxNumberOfTransitions = 1024 + 512
static

Definition at line 153 of file transitions.h.

◆ map_

Tagged<Map> v8::internal::TransitionsAccessor::map_
private

Definition at line 295 of file transitions.h.

◆ raw_transitions_

Tagged<MaybeObject> v8::internal::TransitionsAccessor::raw_transitions_
private

Definition at line 296 of file transitions.h.


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