#if defined(CPPGC_YOUNG_GENERATION)
#include "src/heap/cppgc/remembered-set.h"
#include <algorithm>
#include "include/cppgc/member.h"
#include "include/cppgc/visitor.h"
#include "src/heap/base/basic-slot-set.h"
#include "src/heap/cppgc/heap-base.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/heap-page.h"
#include "src/heap/cppgc/heap-visitor.h"
#include "src/heap/cppgc/marking-state.h"
namespace cppgc {
namespace internal {
namespace {
enum class SlotType { … };
void EraseFromSet(std::set<void*>& set, void* begin, void* end) { … }
void InvalidateCompressedRememberedSlots(
const HeapBase& heap, void* begin, void* end,
std::set<void*>& remembered_slots_for_verification) { … }
void InvalidateUncompressedRememberedSlots(
std::set<void*>& slots, void* begin, void* end,
std::set<void*>& remembered_slots_for_verification) { … }
template <SlotType slot_type>
void VisitSlot(const HeapBase& heap, const BasePage& page, Address slot,
MutatorMarkingState& marking_state,
const std::set<void*>& slots_for_verification) { … }
class CompressedSlotVisitor : HeapVisitor<CompressedSlotVisitor> { … };
class SlotRemover : HeapVisitor<SlotRemover> { … };
void VisitRememberedSlots(
HeapBase& heap, MutatorMarkingState& mutator_marking_state,
const std::set<void*>& remembered_uncompressed_slots,
const std::set<void*>& remembered_slots_for_verification) { … }
void VisitRememberedSourceObjects(
const std::set<HeapObjectHeader*>& remembered_source_objects,
Visitor& visitor) { … }
void RevisitInConstructionObjects(
std::set<HeapObjectHeader*>& remembered_in_construction_objects,
Visitor& visitor, ConservativeTracingVisitor& conservative_visitor) { … }
}
void OldToNewRememberedSet::AddSlot(void* slot) { … }
void OldToNewRememberedSet::AddUncompressedSlot(void* uncompressed_slot) { … }
void OldToNewRememberedSet::AddSourceObject(HeapObjectHeader& hoh) { … }
void OldToNewRememberedSet::AddWeakCallback(WeakCallbackItem item) { … }
void OldToNewRememberedSet::AddInConstructionObjectToBeRetraced(
HeapObjectHeader& hoh) { … }
void OldToNewRememberedSet::InvalidateRememberedSlotsInRange(void* begin,
void* end) { … }
void OldToNewRememberedSet::InvalidateRememberedSourceObject(
HeapObjectHeader& header) { … }
void OldToNewRememberedSet::Visit(
Visitor& visitor, ConservativeTracingVisitor& conservative_visitor,
MutatorMarkingState& marking_state) { … }
void OldToNewRememberedSet::ExecuteCustomCallbacks(LivenessBroker broker) { … }
void OldToNewRememberedSet::ReleaseCustomCallbacks() { … }
void OldToNewRememberedSet::Reset() { … }
bool OldToNewRememberedSet::IsEmpty() const { … }
void OldToNewRememberedSet::RememberedInConstructionObjects::Reset() { … }
}
}
#endif