5#ifndef INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
6#define INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
21class PersistentRegion;
22class CrossThreadPersistentRegion;
27class UntracedMemberTag;
57 bool check_off_heap_assignments);
59 const HeapBase* heap_ =
nullptr;
62template <
bool kCheckOffHeapAssignments>
70 CheckPointersImplTrampoline<T>::Call(
this, ptr);
74 template <
typename T,
bool = IsCompleteV<T>>
75 struct CheckPointersImplTrampoline {
77 policy->CheckPointerImpl(ptr,
false, kCheckOffHeapAssignments);
82 struct CheckPointersImplTrampoline<T, true> {
83 static void Call(SameThreadEnabledCheckingPolicy* policy,
const T* ptr) {
84 policy->CheckPointerImpl(ptr, IsGarbageCollectedTypeV<T>,
85 kCheckOffHeapAssignments);
99 SameThreadEnabledCheckingPolicy<
false >;
101 SameThreadEnabledCheckingPolicy<
true >;
118 : location_(location) {}
141#if CPPGC_SUPPORTS_OBJECT_NAMES
170template <
typename T,
typename WeaknessPolicy,
174template <
typename T,
typename WeaknessPolicy,
178template <
typename T,
typename WeaknessTag,
typename WriteBarrierPolicy,
void CheckPointer(const void *)
constexpr SourceLocation Location() const
constexpr IgnoreLocationPolicy(const SourceLocation &)
constexpr IgnoreLocationPolicy()=default
KeepLocationPolicy & operator=(const KeepLocationPolicy &)=delete
KeepLocationPolicy(KeepLocationPolicy &&)=default
KeepLocationPolicy & operator=(KeepLocationPolicy &&)=default
constexpr KeepLocationPolicy(const SourceLocation &location)
constexpr const SourceLocation & Location() const
KeepLocationPolicy(const KeepLocationPolicy &)=delete
constexpr KeepLocationPolicy()=default
void CheckPointerImpl(const void *ptr, bool points_to_payload, bool check_off_heap_assignments)
void CheckPointer(const T *ptr)
static V8_INLINE void DijkstraMarkingBarrier(const Params ¶ms, const void *object)
static V8_INLINE Type GetWriteBarrierType(const void *slot, const void *value, Params ¶ms)
static V8_INLINE void GenerationalBarrier(const Params ¶ms, const void *slot)
IgnoreLocationPolicy DefaultLocationPolicy
DisabledCheckingPolicy DefaultPersistentCheckingPolicy
DisabledCheckingPolicy DefaultMemberCheckingPolicy
constexpr internal::SentinelPointer kSentinelPointer
static void InitializingBarrier(const void *, const void *)
static void AssigningBarrier(const void *slot, const void *value)
static void AssigningBarrier(const void *, const void *)
static void InitializingBarrier(const void *, const void *)
std::true_type IsStrongPersistent
static V8_EXPORT CrossThreadPersistentRegion & GetPersistentRegion(const void *object)
std::true_type IsStrongPersistent
static V8_EXPORT PersistentRegion & GetPersistentRegion(const void *object)
static V8_EXPORT CrossThreadPersistentRegion & GetPersistentRegion(const void *object)
std::false_type IsStrongPersistent
static V8_EXPORT PersistentRegion & GetPersistentRegion(const void *object)
std::false_type IsStrongPersistent