chromium/v8/src/heap/cppgc/remembered-set.cc

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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) {}

// TODO(1029379): Make the implementation functions private functions of
// OldToNewRememberedSet to avoid parameter passing.
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) {}

// Visit remembered set that was recorded in the generational barrier.
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> {};

// Visit remembered set that was recorded in the generational barrier.
void VisitRememberedSlots(
    HeapBase& heap, MutatorMarkingState& mutator_marking_state,
    const std::set<void*>& remembered_uncompressed_slots,
    const std::set<void*>& remembered_slots_for_verification) {}

// Visits source objects that were recorded in the generational barrier for
// slots.
void VisitRememberedSourceObjects(
    const std::set<HeapObjectHeader*>& remembered_source_objects,
    Visitor& visitor) {}

// Revisit in-construction objects from previous GCs. We must do it to make
// sure that we don't miss any initializing pointer writes if a previous GC
// happened while an object was in-construction.
void RevisitInConstructionObjects(
    std::set<HeapObjectHeader*>& remembered_in_construction_objects,
    Visitor& visitor, ConservativeTracingVisitor& conservative_visitor) {}

}  // namespace

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() {}

}  // namespace internal
}  // namespace cppgc

#endif  // defined(CPPGC_YOUNG_GENERATION)