Lines Matching refs:heap
5 #include "src/heap/objects-visiting.h"
7 #include "src/heap/heap-inl.h"
8 #include "src/heap/mark-compact-inl.h"
9 #include "src/heap/objects-visiting-inl.h"
18 static bool MustRecordSlots(Heap* heap) {
19 return heap->gc_state() == Heap::MARK_COMPACT &&
20 heap->mark_compact_collector()->is_compacting();
28 Object VisitWeakList(Heap* heap, Object list, WeakObjectRetainer* retainer) {
29 HeapObject undefined = ReadOnlyRoots(heap).undefined_value();
32 bool record_slots = MustRecordSlots(heap);
60 DCHECK(!retained.IsUndefined(heap->isolate()));
65 WeakListVisitor<T>::VisitLiveObject(heap, tail, retainer);
68 WeakListVisitor<T>::VisitPhantomObject(heap, candidate);
78 static void ClearWeakList(Heap* heap, Object list) {
79 Object undefined = ReadOnlyRoots(heap).undefined_value();
106 static void VisitPhantomObject(Heap* heap, CodeT code) {
109 SetWeakNext(code, ReadOnlyRoots(heap).undefined_value());
129 static void VisitLiveObject(Heap* heap, Context context,
131 if (heap->gc_state() == Heap::MARK_COMPACT) {
141 DoWeakList<CodeT>(heap, context, retainer, Context::OPTIMIZED_CODE_LIST);
142 DoWeakList<CodeT>(heap, context, retainer,
148 static void DoWeakList(Heap* heap, Context context,
151 Object list_head = VisitWeakList<T>(heap, context.get(index), retainer);
156 if (MustRecordSlots(heap)) {
159 heap->mark_compact_collector()->RecordSlot(context, head_slot,
164 static void VisitPhantomObject(Heap* heap, Context context) {
165 ClearWeakList<CodeT>(heap, context.get(Context::OPTIMIZED_CODE_LIST));
166 ClearWeakList<CodeT>(heap, context.get(Context::DEOPTIMIZED_CODE_LIST));
204 static void VisitLiveObject(Heap* heap, JSFinalizationRegistry obj,
206 heap->set_dirty_js_finalization_registries_list_tail(obj);
212 template Object VisitWeakList<Context>(Heap* heap, Object list,
215 template Object VisitWeakList<AllocationSite>(Heap* heap, Object list,
219 Heap* heap, Object list, WeakObjectRetainer* retainer);