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

#include <global-handles.h>

Collaboration diagram for v8::internal::GlobalHandles:

Classes

class  Node
 
class  NodeBlock
 
class  NodeIterator
 
class  NodeSpace
 
class  PendingPhantomCallback
 

Public Member Functions

 GlobalHandles (const GlobalHandles &)=delete
 
GlobalHandlesoperator= (const GlobalHandles &)=delete
 
 GlobalHandles (Isolate *isolate)
 
 ~GlobalHandles ()
 
IndirectHandle< ObjectCreate (Tagged< Object > value)
 
IndirectHandle< ObjectCreate (Address value)
 
template<typename T >
IndirectHandle< TCreate (Tagged< T > value)
 
void RecordStats (HeapStats *stats)
 
size_t InvokeFirstPassWeakCallbacks ()
 
void InvokeSecondPassPhantomCallbacks ()
 
void PostGarbageCollectionProcessing (v8::GCCallbackFlags gc_callback_flags)
 
void IterateStrongRoots (RootVisitor *v)
 
void IterateWeakRoots (RootVisitor *v)
 
void IterateAllRoots (RootVisitor *v)
 
void IterateAllYoungRoots (RootVisitor *v)
 
void IterateWeakRootsForPhantomHandles (WeakSlotCallbackWithHeap should_reset_handle)
 
void IterateYoungStrongAndDependentRoots (RootVisitor *v)
 
void ProcessWeakYoungObjects (RootVisitor *v, WeakSlotCallbackWithHeap should_reset_handle)
 
void UpdateListOfYoungNodes ()
 
void ClearListOfYoungNodes ()
 
Isolateisolate () const
 
size_t TotalSize () const
 
size_t UsedSize () const
 
size_t handles_count () const
 
size_t last_gc_custom_callbacks () const
 
void IterateAllRootsForTesting (v8::PersistentHandleVisitor *v)
 
bool HasYoung () const
 

Static Public Member Functions

static void MoveGlobal (Address **from, Address **to)
 
static IndirectHandle< ObjectCopyGlobal (Address *location)
 
static void Destroy (Address *location)
 
static void MakeWeak (Address *location, void *parameter, WeakCallbackInfo< void >::Callback weak_callback, v8::WeakCallbackType type)
 
static void MakeWeak (Address **location_addr)
 
static void AnnotateStrongRetainer (Address *location, const char *label)
 
static void * ClearWeakness (Address *location)
 
static bool IsWeak (Address *location)
 

Private Member Functions

void ApplyPersistentHandleVisitor (v8::PersistentHandleVisitor *visitor, Node *node)
 
bool ResetWeakNodeIfDead (Node *node, WeakSlotCallbackWithHeap should_reset_node)
 

Private Attributes

Isolate *const isolate_
 
std::unique_ptr< NodeSpace< Node > > regular_nodes_
 
std::vector< Node * > young_nodes_
 
std::vector< std::pair< Node *, PendingPhantomCallback > > pending_phantom_callbacks_
 
std::vector< PendingPhantomCallbacksecond_pass_callbacks_
 
bool second_pass_callbacks_task_posted_ = false
 
size_t last_gc_custom_callbacks_ = 0
 

Detailed Description

Definition at line 30 of file global-handles.h.

Constructor & Destructor Documentation

◆ GlobalHandles() [1/2]

v8::internal::GlobalHandles::GlobalHandles ( const GlobalHandles & )
delete

◆ GlobalHandles() [2/2]

v8::internal::GlobalHandles::GlobalHandles ( Isolate * isolate)
explicit

Definition at line 609 of file global-handles.cc.

◆ ~GlobalHandles()

v8::internal::GlobalHandles::~GlobalHandles ( )
default

Member Function Documentation

◆ AnnotateStrongRetainer()

void v8::internal::GlobalHandles::AnnotateStrongRetainer ( Address * location,
const char * label )
static

Definition at line 683 of file global-handles.cc.

Here is the call graph for this function:

◆ ApplyPersistentHandleVisitor()

DISABLE_CFI_PERF void v8::internal::GlobalHandles::ApplyPersistentHandleVisitor ( v8::PersistentHandleVisitor * visitor,
GlobalHandles::Node * node )
private

Definition at line 941 of file global-handles.cc.

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

◆ ClearListOfYoungNodes()

void v8::internal::GlobalHandles::ClearListOfYoungNodes ( )

Definition at line 821 of file global-handles.cc.

Here is the caller graph for this function:

◆ ClearWeakness()

void * v8::internal::GlobalHandles::ClearWeakness ( Address * location)
static

Definition at line 679 of file global-handles.cc.

Here is the call graph for this function:

◆ CopyGlobal()

IndirectHandle< Object > v8::internal::GlobalHandles::CopyGlobal ( Address * location)
static

Definition at line 637 of file global-handles.cc.

Here is the call graph for this function:

◆ Create() [1/3]

IndirectHandle< Object > v8::internal::GlobalHandles::Create ( Address value)

Definition at line 633 of file global-handles.cc.

Here is the call graph for this function:

◆ Create() [2/3]

IndirectHandle< Object > v8::internal::GlobalHandles::Create ( Tagged< Object > value)

Definition at line 624 of file global-handles.cc.

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

◆ Create() [3/3]

template<typename T >
IndirectHandle< T > v8::internal::GlobalHandles::Create ( Tagged< T > value)
inline

Definition at line 19 of file global-handles-inl.h.

Here is the call graph for this function:

◆ Destroy()

void v8::internal::GlobalHandles::Destroy ( Address * location)
static

Definition at line 661 of file global-handles.cc.

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

◆ handles_count()

size_t v8::internal::GlobalHandles::handles_count ( ) const

Definition at line 605 of file global-handles.cc.

◆ HasYoung()

bool v8::internal::GlobalHandles::HasYoung ( ) const
inline

Definition at line 133 of file global-handles.h.

◆ InvokeFirstPassWeakCallbacks()

size_t v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks ( )

Definition at line 825 of file global-handles.cc.

Here is the call graph for this function:

◆ InvokeSecondPassPhantomCallbacks()

void v8::internal::GlobalHandles::InvokeSecondPassPhantomCallbacks ( )

Definition at line 745 of file global-handles.cc.

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

◆ isolate()

Isolate * v8::internal::GlobalHandles::isolate ( ) const
inline

Definition at line 118 of file global-handles.h.

Here is the caller graph for this function:

◆ IsWeak()

bool v8::internal::GlobalHandles::IsWeak ( Address * location)
static

Definition at line 688 of file global-handles.cc.

Here is the call graph for this function:

◆ IterateAllRoots()

DISABLE_CFI_PERF void v8::internal::GlobalHandles::IterateAllRoots ( RootVisitor * v)

Definition at line 921 of file global-handles.cc.

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

◆ IterateAllRootsForTesting()

void v8::internal::GlobalHandles::IterateAllRootsForTesting ( v8::PersistentHandleVisitor * v)

Definition at line 949 of file global-handles.cc.

Here is the call graph for this function:

◆ IterateAllYoungRoots()

DISABLE_CFI_PERF void v8::internal::GlobalHandles::IterateAllYoungRoots ( RootVisitor * v)

Definition at line 931 of file global-handles.cc.

Here is the call graph for this function:

◆ IterateStrongRoots()

void v8::internal::GlobalHandles::IterateStrongRoots ( RootVisitor * v)

Definition at line 902 of file global-handles.cc.

Here is the call graph for this function:

◆ IterateWeakRoots()

void v8::internal::GlobalHandles::IterateWeakRoots ( RootVisitor * v)

Definition at line 911 of file global-handles.cc.

Here is the call graph for this function:

◆ IterateWeakRootsForPhantomHandles()

DISABLE_CFI_PERF void v8::internal::GlobalHandles::IterateWeakRootsForPhantomHandles ( WeakSlotCallbackWithHeap should_reset_handle)

Definition at line 712 of file global-handles.cc.

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

◆ IterateYoungStrongAndDependentRoots()

void v8::internal::GlobalHandles::IterateYoungStrongAndDependentRoots ( RootVisitor * v)

Definition at line 719 of file global-handles.cc.

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

◆ last_gc_custom_callbacks()

size_t v8::internal::GlobalHandles::last_gc_custom_callbacks ( ) const
inline

Definition at line 124 of file global-handles.h.

◆ MakeWeak() [1/2]

void v8::internal::GlobalHandles::MakeWeak ( Address ** location_addr)
static

Definition at line 675 of file global-handles.cc.

Here is the call graph for this function:

◆ MakeWeak() [2/2]

static void v8::internal::GlobalHandles::MakeWeak ( Address * location,
void * parameter,
WeakCallbackInfo< void >::Callback weak_callback,
v8::WeakCallbackType type )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MoveGlobal()

void v8::internal::GlobalHandles::MoveGlobal ( Address ** from,
Address ** to )
static

Definition at line 650 of file global-handles.cc.

Here is the call graph for this function:

◆ operator=()

GlobalHandles & v8::internal::GlobalHandles::operator= ( const GlobalHandles & )
delete

◆ PostGarbageCollectionProcessing()

void v8::internal::GlobalHandles::PostGarbageCollectionProcessing ( v8::GCCallbackFlags gc_callback_flags)

Definition at line 869 of file global-handles.cc.

Here is the call graph for this function:

◆ ProcessWeakYoungObjects()

void v8::internal::GlobalHandles::ProcessWeakYoungObjects ( RootVisitor * v,
WeakSlotCallbackWithHeap should_reset_handle )

Definition at line 728 of file global-handles.cc.

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

◆ RecordStats()

void v8::internal::GlobalHandles::RecordStats ( HeapStats * stats)

Definition at line 958 of file global-handles.cc.

◆ ResetWeakNodeIfDead()

V8_INLINE bool v8::internal::GlobalHandles::ResetWeakNodeIfDead ( Node * node,
WeakSlotCallbackWithHeap should_reset_node )
private

Definition at line 692 of file global-handles.cc.

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

◆ TotalSize()

size_t v8::internal::GlobalHandles::TotalSize ( ) const

Definition at line 599 of file global-handles.cc.

◆ UpdateListOfYoungNodes()

void v8::internal::GlobalHandles::UpdateListOfYoungNodes ( )

Definition at line 817 of file global-handles.cc.

Here is the caller graph for this function:

◆ UsedSize()

size_t v8::internal::GlobalHandles::UsedSize ( ) const

Definition at line 601 of file global-handles.cc.

Member Data Documentation

◆ isolate_

Isolate* const v8::internal::GlobalHandles::isolate_
private

Definition at line 154 of file global-handles.h.

◆ last_gc_custom_callbacks_

size_t v8::internal::GlobalHandles::last_gc_custom_callbacks_ = 0
private

Definition at line 164 of file global-handles.h.

◆ pending_phantom_callbacks_

std::vector<std::pair<Node*, PendingPhantomCallback> > v8::internal::GlobalHandles::pending_phantom_callbacks_
private

Definition at line 161 of file global-handles.h.

◆ regular_nodes_

std::unique_ptr<NodeSpace<Node> > v8::internal::GlobalHandles::regular_nodes_
private

Definition at line 156 of file global-handles.h.

◆ second_pass_callbacks_

std::vector<PendingPhantomCallback> v8::internal::GlobalHandles::second_pass_callbacks_
private

Definition at line 162 of file global-handles.h.

◆ second_pass_callbacks_task_posted_

bool v8::internal::GlobalHandles::second_pass_callbacks_task_posted_ = false
private

Definition at line 163 of file global-handles.h.

◆ young_nodes_

std::vector<Node*> v8::internal::GlobalHandles::young_nodes_
private

Definition at line 159 of file global-handles.h.


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