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

Public Member Functions

 State (const HeapObjectHeader &header, size_t state_count)
 
 ~State () final=default
 
const HeapObjectHeaderheader () const
 
void MarkVisited ()
 
void MarkPending ()
 
void UnmarkPending ()
 
void MarkVisible ()
 
void MarkDependentVisibility (StateBase *dependency)
 
void MarkAsWeakContainer ()
 
bool IsWeakContainer () const
 
void MarkVisitedFromStack ()
 
bool WasVisitedFromStack () const
 
void RecordEphemeronKey (const HeapObjectHeader &key)
 
void AddEphemeronEdge (const HeapObjectHeader &value)
 
void AddEagerEphemeronEdge (const void *value, cppgc::TraceCallback callback)
 
template<typename Callback >
void ForAllEphemeronKeys (Callback callback)
 
template<typename Callback >
void ForAllEphemeronEdges (Callback callback)
 
template<typename Callback >
void ForAllEagerEphemeronEdges (Callback callback)
 
- Public Member Functions inherited from v8::internal::StateBase
 StateBase (const void *key, size_t state_count, Visibility visibility, EmbedderNode *node, bool visited)
 
virtual ~StateBase ()=default
 
bool IsVisited () const
 
bool IsPending () const
 
bool IsVisibleNotDependent ()
 
void set_node (EmbedderNode *node)
 
EmbedderNodeget_node ()
 

Private Attributes

bool is_weak_container_ = false
 
bool was_visited_from_stack_ = false
 
std::unordered_set< const HeapObjectHeader * > ephemeron_keys_
 
std::unordered_set< const HeapObjectHeader * > ephemeron_edges_
 
std::unordered_map< const void *, cppgc::TraceCallbackeager_ephemeron_edges_
 

Additional Inherited Members

- Public Types inherited from v8::internal::StateBase
enum class  Visibility { kHidden , kDependentVisibility , kVisible }
 
- Protected Member Functions inherited from v8::internal::StateBase
Visibility GetVisibility ()
 
StateBaseFollowDependencies ()
 
- Protected Attributes inherited from v8::internal::StateBase
const void * key_
 
const size_t state_count_
 
Visibility visibility_
 
StateBasevisibility_dependency_ = nullptr
 
EmbedderNodenode_
 
bool visited_
 
bool pending_ = false
 

Detailed Description

Definition at line 203 of file cpp-snapshot.cc.

Constructor & Destructor Documentation

◆ State()

v8::internal::State::State ( const HeapObjectHeader & header,
size_t state_count )
inline

Definition at line 205 of file cpp-snapshot.cc.

◆ ~State()

v8::internal::State::~State ( )
finaldefault

Member Function Documentation

◆ AddEagerEphemeronEdge()

void v8::internal::State::AddEagerEphemeronEdge ( const void * value,
cppgc::TraceCallback callback )
inline

Definition at line 284 of file cpp-snapshot.cc.

◆ AddEphemeronEdge()

void v8::internal::State::AddEphemeronEdge ( const HeapObjectHeader & value)
inline

Definition at line 278 of file cpp-snapshot.cc.

◆ ForAllEagerEphemeronEdges()

template<typename Callback >
void v8::internal::State::ForAllEagerEphemeronEdges ( Callback callback)
inline

Definition at line 303 of file cpp-snapshot.cc.

◆ ForAllEphemeronEdges()

template<typename Callback >
void v8::internal::State::ForAllEphemeronEdges ( Callback callback)
inline

Definition at line 296 of file cpp-snapshot.cc.

◆ ForAllEphemeronKeys()

template<typename Callback >
void v8::internal::State::ForAllEphemeronKeys ( Callback callback)
inline

Definition at line 289 of file cpp-snapshot.cc.

◆ header()

const HeapObjectHeader * v8::internal::State::header ( ) const
inline

Definition at line 209 of file cpp-snapshot.cc.

Here is the caller graph for this function:

◆ IsWeakContainer()

bool v8::internal::State::IsWeakContainer ( ) const
inline

Definition at line 267 of file cpp-snapshot.cc.

◆ MarkAsWeakContainer()

void v8::internal::State::MarkAsWeakContainer ( )
inline

Definition at line 266 of file cpp-snapshot.cc.

◆ MarkDependentVisibility()

void v8::internal::State::MarkDependentVisibility ( StateBase * dependency)
inline

Definition at line 223 of file cpp-snapshot.cc.

Here is the caller graph for this function:

◆ MarkPending()

void v8::internal::State::MarkPending ( )
inline

Definition at line 215 of file cpp-snapshot.cc.

◆ MarkVisible()

void v8::internal::State::MarkVisible ( )
inline

Definition at line 218 of file cpp-snapshot.cc.

Here is the caller graph for this function:

◆ MarkVisited()

void v8::internal::State::MarkVisited ( )
inline

Definition at line 213 of file cpp-snapshot.cc.

◆ MarkVisitedFromStack()

void v8::internal::State::MarkVisitedFromStack ( )
inline

Definition at line 269 of file cpp-snapshot.cc.

◆ RecordEphemeronKey()

void v8::internal::State::RecordEphemeronKey ( const HeapObjectHeader & key)
inline

Definition at line 272 of file cpp-snapshot.cc.

◆ UnmarkPending()

void v8::internal::State::UnmarkPending ( )
inline

Definition at line 216 of file cpp-snapshot.cc.

◆ WasVisitedFromStack()

bool v8::internal::State::WasVisitedFromStack ( ) const
inline

Definition at line 270 of file cpp-snapshot.cc.

Member Data Documentation

◆ eager_ephemeron_edges_

std::unordered_map<const void*, cppgc::TraceCallback> v8::internal::State::eager_ephemeron_edges_
private

Definition at line 319 of file cpp-snapshot.cc.

◆ ephemeron_edges_

std::unordered_set<const HeapObjectHeader*> v8::internal::State::ephemeron_edges_
private

Definition at line 316 of file cpp-snapshot.cc.

◆ ephemeron_keys_

std::unordered_set<const HeapObjectHeader*> v8::internal::State::ephemeron_keys_
private

Definition at line 314 of file cpp-snapshot.cc.

◆ is_weak_container_

bool v8::internal::State::is_weak_container_ = false
private

Definition at line 310 of file cpp-snapshot.cc.

◆ was_visited_from_stack_

bool v8::internal::State::was_visited_from_stack_ = false
private

Definition at line 311 of file cpp-snapshot.cc.


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