chromium/v8/src/heap/cppgc/heap-base.cc

// Copyright 2020 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.

#include "src/heap/cppgc/heap-base.h"

#include <memory>

#include "include/cppgc/heap-consistency.h"
#include "include/cppgc/platform.h"
#include "src/base/logging.h"
#include "src/base/sanitizer/lsan-page-allocator.h"
#include "src/heap/base/stack.h"
#include "src/heap/cppgc/globals.h"
#include "src/heap/cppgc/heap-config.h"
#include "src/heap/cppgc/heap-object-header.h"
#include "src/heap/cppgc/heap-page.h"
#include "src/heap/cppgc/heap-statistics-collector.h"
#include "src/heap/cppgc/heap-visitor.h"
#include "src/heap/cppgc/marking-verifier.h"
#include "src/heap/cppgc/object-view.h"
#include "src/heap/cppgc/page-memory.h"
#include "src/heap/cppgc/platform.h"
#include "src/heap/cppgc/prefinalizer-handler.h"
#include "src/heap/cppgc/stats-collector.h"
#include "src/heap/cppgc/unmarker.h"
#include "src/heap/cppgc/write-barrier.h"

namespace cppgc {
namespace internal {

namespace {

class ObjectSizeCounter : private HeapVisitor<ObjectSizeCounter> {};

#if defined(CPPGC_YOUNG_GENERATION)
class AgeTableResetter final : protected HeapVisitor<AgeTableResetter> {};
#endif  // defined(CPPGC_YOUNG_GENERATION)

}  // namespace

HeapBase::HeapBase(
    std::shared_ptr<cppgc::Platform> platform,
    const std::vector<std::unique_ptr<CustomSpaceBase>>& custom_spaces,
    StackSupport stack_support, MarkingType marking_support,
    SweepingType sweeping_support, GarbageCollector& garbage_collector)
    :{}

HeapBase::~HeapBase() = default;

PageAllocator* HeapBase::page_allocator() const {}

size_t HeapBase::ObjectPayloadSize() const {}

// static
std::unique_ptr<PageBackend> HeapBase::InitializePageBackend(
    PageAllocator& allocator) {}

size_t HeapBase::ExecutePreFinalizers() {}

#if defined(CPPGC_YOUNG_GENERATION)
void HeapBase::EnableGenerationalGC() {}

void HeapBase::ResetRememberedSet() {}

#endif  // defined(CPPGC_YOUNG_GENERATION)

void HeapBase::Terminate() {}

HeapStatistics HeapBase::CollectStatistics(
    HeapStatistics::DetailLevel detail_level) {}

void HeapBase::CallMoveListeners(Address from, Address to,
                                 size_t size_including_header) {}

void HeapBase::RegisterMoveListener(MoveListener* listener) {}

void HeapBase::UnregisterMoveListener(MoveListener* listener) {}

bool HeapBase::IsGCForbidden() const {}

bool HeapBase::IsGCAllowed() const {}

ClassNameAsHeapObjectNameScope::ClassNameAsHeapObjectNameScope(HeapBase& heap)
    :{}

ClassNameAsHeapObjectNameScope::~ClassNameAsHeapObjectNameScope() {}

}  // namespace internal
}  // namespace cppgc