5 #ifndef INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
6 #define INCLUDE_CPPGC_INTERNAL_POINTER_POLICIES_H_
11 #include "cppgc/internal/write-barrier.h"
12 #include "cppgc/sentinel-pointer.h"
13 #include "cppgc/source-location.h"
14 #include "cppgc/type-traits.h"
22 class CrossThreadPersistentRegion;
25 class StrongMemberTag;
27 class UntracedMemberTag;
35 WriteBarrier::
Params params;
60 CheckPointersImplTrampoline<T>::Call(
this, ptr);
64 void CheckPointerImpl(
const void* ptr,
bool points_to_payload);
66 template <
typename T,
bool = IsCompleteV<T>>
67 struct CheckPointersImplTrampoline {
69 policy->CheckPointerImpl(ptr,
false);
74 struct CheckPointersImplTrampoline<T,
true> {
76 policy->CheckPointerImpl(ptr, IsGarbageCollectedTypeV<T>);
80 const HeapBase* heap_ =
nullptr;
107 : location_(location) {}
130 #if CPPGC_SUPPORTS_OBJECT_NAMES
137 using IsStrongPersistent = std::true_type;
142 using IsStrongPersistent = std::false_type;
147 using IsStrongPersistent = std::true_type;
153 using IsStrongPersistent = std::false_type;
159 template <
typename T,
typename WeaknessPolicy,
160 typename LocationPolicy = DefaultLocationPolicy,
161 typename CheckingPolicy = DefaultCrossThreadPersistentCheckingPolicy>
163 template <
typename T,
typename WeaknessPolicy,
164 typename LocationPolicy = DefaultLocationPolicy,
165 typename CheckingPolicy = DefaultPersistentCheckingPolicy>
167 template <
typename T,
typename WeaknessTag,
typename WriteBarrierPolicy,
168 typename CheckingPolicy = DefaultMemberCheckingPolicy>