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"
21 class PersistentRegion;
22 class CrossThreadPersistentRegion;
25 class StrongMemberTag;
27 class UntracedMemberTag;
35 WriteBarrier::
Params params;
57 bool check_off_heap_assignments);
59 const HeapBase*
heap_ =
nullptr;
62 template <
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> {
84 policy->CheckPointerImpl(ptr, IsGarbageCollectedTypeV<T>,
85 kCheckOffHeapAssignments);
118 : location_(location) {}
141 #if CPPGC_SUPPORTS_OBJECT_NAMES
148 using IsStrongPersistent = std::true_type;
153 using IsStrongPersistent = std::false_type;
158 using IsStrongPersistent = std::true_type;
164 using IsStrongPersistent = std::false_type;
170 template <
typename T,
typename WeaknessPolicy,
171 typename LocationPolicy = DefaultLocationPolicy,
172 typename CheckingPolicy = DefaultCrossThreadPersistentCheckingPolicy>
174 template <
typename T,
typename WeaknessPolicy,
175 typename LocationPolicy = DefaultLocationPolicy,
176 typename CheckingPolicy = DefaultPersistentCheckingPolicy>
178 template <
typename T,
typename WeaknessTag,
typename WriteBarrierPolicy,
179 typename CheckingPolicy = DefaultMemberCheckingPolicy>