#ifndef V8_HEAP_CPPGC_HEAP_PAGE_H_
#define V8_HEAP_CPPGC_HEAP_PAGE_H_
#include <atomic>
#include "include/cppgc/internal/base-page-handle.h"
#include "src/base/functional.h"
#include "src/base/iterator.h"
#include "src/base/macros.h"
#include "src/heap/base/basic-slot-set.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/object-start-bitmap.h"
namespace cppgc {
namespace internal {
class BaseSpace;
class NormalPageSpace;
class LargePageSpace;
class HeapBase;
class PageBackend;
class SlotSet;
class V8_EXPORT_PRIVATE BasePage : public BasePageHandle { … };
class V8_EXPORT_PRIVATE NormalPage final : public BasePage { … };
class V8_EXPORT_PRIVATE LargePage final : public BasePage { … };
BasePage* BasePage::FromPayload(void* payload) { … }
const BasePage* BasePage::FromPayload(const void* payload) { … }
template <AccessMode mode = AccessMode::kNonAtomic>
const HeapObjectHeader* ObjectHeaderFromInnerAddressImpl(const BasePage* page,
const void* address) { … }
template <AccessMode mode>
HeapObjectHeader& BasePage::ObjectHeaderFromInnerAddress(void* address) const { … }
template <AccessMode mode>
const HeapObjectHeader& BasePage::ObjectHeaderFromInnerAddress(
const void* address) const { … }
#if defined(CPPGC_YOUNG_GENERATION)
SlotSet& BasePage::GetOrAllocateSlotSet() { … }
#endif
}
}
namespace v8::base {
template <>
struct hash<const cppgc::internal::BasePage*> { … };
}
#endif