v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > Class Template Reference

#include <persistent.h>

Inheritance diagram for cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >:
Collaboration diagram for cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >:

Public Types

using PointeeType = T
 

Public Member Functions

 BasicPersistent (const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (std::nullptr_t, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (SentinelPointer s, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (T *raw, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (T &raw, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (const BasicPersistent &other, const SourceLocation &loc=SourceLocation::Current())
 
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
 BasicPersistent (const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (BasicPersistent &&other, const SourceLocation &loc=SourceLocation::Current()) noexcept
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename MemberStorageType , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
 BasicPersistent (const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType > &member, const SourceLocation &loc=SourceLocation::Current())
 
 ~BasicPersistent ()
 
BasicPersistentoperator= (const BasicPersistent &other)
 
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistentoperator= (const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other)
 
BasicPersistentoperator= (BasicPersistent &&other) noexcept
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename MemberStorageType , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistentoperator= (const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType > &member)
 
BasicPersistentoperator= (T *other)
 
BasicPersistentoperator= (std::nullptr_t)
 
BasicPersistentoperator= (SentinelPointer s)
 
 operator bool () const
 
 operator T* () const
 
Toperator-> () const
 
Toperator* () const
 
 V8_CLANG_NO_SANITIZE ("cfi-unrelated-cast") T *Get() const
 
void Clear ()
 
TRelease ()
 
template<typename U , typename OtherWeaknessPolicy = WeaknessPolicy, typename OtherLocationPolicy = LocationPolicy, typename OtherCheckingPolicy = CheckingPolicy>
BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > To () const
 

Private Member Functions

bool IsValid () const
 
void Assign (T *ptr)
 
void ClearFromGC () const
 
TGetFromGC () const
 

Static Private Member Functions

static void TraceAsRoot (RootVisitor &root_visitor, const void *ptr)
 

Friends

class internal::RootVisitor
 

Additional Inherited Members

- Protected Member Functions inherited from cppgc::internal::PersistentBase
 PersistentBase ()=default
 
 PersistentBase (const void *raw)
 
const void * GetValue () const
 
void SetValue (const void *value)
 
PersistentNodeGetNode () const
 
void SetNode (PersistentNode *node)
 
void ClearFromGC () const
 
- Protected Attributes inherited from cppgc::internal::PersistentBase
const void * raw_ = nullptr
 
PersistentNodenode_ = nullptr
 

Detailed Description

template<typename T, typename WeaknessPolicy, typename LocationPolicy, typename CheckingPolicy>
class cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >

Definition at line 31 of file visitor.h.

Member Typedef Documentation

◆ PointeeType

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
using cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::PointeeType = T

Definition at line 57 of file persistent.h.

Constructor & Destructor Documentation

◆ BasicPersistent() [1/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( const SourceLocation & loc = SourceLocation::Current())
inline

Definition at line 60 of file persistent.h.

◆ BasicPersistent() [2/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( std::nullptr_t ,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 64 of file persistent.h.

◆ BasicPersistent() [3/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( SentinelPointer s,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 68 of file persistent.h.

◆ BasicPersistent() [4/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( T * raw,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 73 of file persistent.h.

Here is the call graph for this function:

◆ BasicPersistent() [5/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( T & raw,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 82 of file persistent.h.

◆ BasicPersistent() [6/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( const BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > & other,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 87 of file persistent.h.

◆ BasicPersistent() [7/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > & other,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 96 of file persistent.h.

◆ BasicPersistent() [8/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > && other,
const SourceLocation & loc = SourceLocation::Current() )
inlinenoexcept

Definition at line 104 of file persistent.h.

Here is the call graph for this function:

◆ BasicPersistent() [9/9]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename MemberStorageType , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::BasicPersistent ( const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType > & member,
const SourceLocation & loc = SourceLocation::Current() )
inline

Definition at line 121 of file persistent.h.

◆ ~BasicPersistent()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::~BasicPersistent ( )
inline

Definition at line 127 of file persistent.h.

Here is the call graph for this function:

Member Function Documentation

◆ Assign()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
void cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::Assign ( T * ptr)
inlineprivate

Definition at line 239 of file persistent.h.

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

◆ Clear()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
void cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::Clear ( )
inline

Definition at line 201 of file persistent.h.

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

◆ ClearFromGC()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
void cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::ClearFromGC ( ) const
inlineprivate

Definition at line 257 of file persistent.h.

Here is the call graph for this function:

◆ GetFromGC()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
T * cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::GetFromGC ( ) const
inlineprivate

Definition at line 266 of file persistent.h.

Here is the call graph for this function:

◆ IsValid()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
bool cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::IsValid ( ) const
inlineprivate

Definition at line 232 of file persistent.h.

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

◆ operator bool()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator bool ( ) const
inlineexplicit

Definition at line 184 of file persistent.h.

◆ operator T*()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator T* ( ) const
inline

Definition at line 187 of file persistent.h.

◆ operator*()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
T & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator* ( ) const
inline

Definition at line 189 of file persistent.h.

◆ operator->()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
T * cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator-> ( ) const
inline

Definition at line 188 of file persistent.h.

◆ operator=() [1/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > && other)
inlinenoexcept

Definition at line 144 of file persistent.h.

Here is the call graph for this function:

◆ operator=() [2/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( const BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > & other)
inline

Definition at line 130 of file persistent.h.

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

◆ operator=() [3/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > & other)
inline

Definition at line 137 of file persistent.h.

Here is the call graph for this function:

◆ operator=() [4/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename MemberStorageType , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( const internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy, MemberStorageType > & member)
inline

Definition at line 162 of file persistent.h.

Here is the call graph for this function:

◆ operator=() [5/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( SentinelPointer s)
inline

Definition at line 179 of file persistent.h.

Here is the call graph for this function:

◆ operator=() [6/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( std::nullptr_t )
inline

Definition at line 174 of file persistent.h.

Here is the call graph for this function:

◆ operator=() [7/7]

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
BasicPersistent & cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::operator= ( T * other)
inline

Definition at line 169 of file persistent.h.

Here is the call graph for this function:

◆ Release()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
T * cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::Release ( )
inline

Definition at line 211 of file persistent.h.

Here is the call graph for this function:

◆ To()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
template<typename U , typename OtherWeaknessPolicy = WeaknessPolicy, typename OtherLocationPolicy = LocationPolicy, typename OtherCheckingPolicy = CheckingPolicy>
BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::To ( ) const
inline

Definition at line 222 of file persistent.h.

◆ TraceAsRoot()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
static void cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::TraceAsRoot ( RootVisitor & root_visitor,
const void * ptr )
inlinestaticprivate

Definition at line 228 of file persistent.h.

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

◆ V8_CLANG_NO_SANITIZE()

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
cppgc::internal::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::V8_CLANG_NO_SANITIZE ( "cfi-unrelated-cast" ) const
inline

Definition at line 194 of file persistent.h.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ internal::RootVisitor

template<typename T , typename WeaknessPolicy , typename LocationPolicy , typename CheckingPolicy >
friend class internal::RootVisitor
friend

Definition at line 270 of file persistent.h.


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