v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
EphemeronPair< K, V > Struct Template Reference

#include <visitor.h>

Collaboration diagram for EphemeronPair< K, V >:

Public Member Functions

 CPPGC_DISALLOW_NEW ()
 
 EphemeronPair (K *k, V *v)
 
void ClearValueIfKeyIsDead (const LivenessBroker &broker)
 
void Trace (Visitor *visitor) const
 

Data Fields

WeakMember< K > key
 
Member< Vvalue
 

Detailed Description

template<typename K, typename V>
struct cppgc::EphemeronPair< K, V >

An ephemeron pair is used to conditionally retain an object. The value will be kept alive only if the key is alive.

Definition at line 44 of file visitor.h.

Constructor & Destructor Documentation

◆ EphemeronPair()

template<typename K, typename V>
EphemeronPair ( K * k,
V * v )
inline

Definition at line 47 of file visitor.h.

References key, V, and value.

Member Function Documentation

◆ ClearValueIfKeyIsDead()

template<typename K, typename V>
void ClearValueIfKeyIsDead ( const LivenessBroker & broker)
inline

Definition at line 51 of file visitor.h.

References LivenessBroker::IsHeapObjectAlive(), key, and value.

Referenced by Visitor::Trace().

◆ CPPGC_DISALLOW_NEW()

template<typename K, typename V>
CPPGC_DISALLOW_NEW ( )

◆ Trace()

template<typename K, typename V>
void Trace ( Visitor * visitor) const

Definition at line 459 of file visitor.h.

References key, Visitor::TraceEphemeron(), and value.

Field Documentation

◆ key

template<typename K, typename V>
WeakMember<K> key

Definition at line 48 of file visitor.h.

Referenced by ClearValueIfKeyIsDead(), EphemeronPair(), Trace(), and Visitor::Trace().

◆ value

template<typename K, typename V>
Member<V> value

Definition at line 49 of file visitor.h.

Referenced by ClearValueIfKeyIsDead(), EphemeronPair(), Trace(), and Visitor::Trace().


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