#ifndef V8_HEAP_HEAP_INL_H_
#define V8_HEAP_HEAP_INL_H_
#include <atomic>
#include <cmath>
#include <optional>
#include "src/base/atomic-utils.h"
#include "src/base/atomicops.h"
#include "src/base/platform/mutex.h"
#include "src/base/platform/platform.h"
#include "src/common/assert-scope.h"
#include "src/common/code-memory-access-inl.h"
#include "src/execution/isolate-data.h"
#include "src/execution/isolate.h"
#include "src/heap/heap-allocator-inl.h"
#include "src/heap/heap-write-barrier.h"
#include "src/heap/heap.h"
#include "src/heap/large-spaces.h"
#include "src/heap/marking-state-inl.h"
#include "src/heap/memory-allocator.h"
#include "src/heap/memory-chunk-inl.h"
#include "src/heap/memory-chunk-layout.h"
#include "src/heap/mutable-page-metadata.h"
#include "src/heap/new-spaces-inl.h"
#include "src/heap/paged-spaces-inl.h"
#include "src/heap/read-only-heap.h"
#include "src/heap/read-only-spaces.h"
#include "src/heap/safepoint.h"
#include "src/heap/spaces-inl.h"
#include "src/objects/allocation-site-inl.h"
#include "src/objects/cell-inl.h"
#include "src/objects/descriptor-array.h"
#include "src/objects/feedback-cell-inl.h"
#include "src/objects/feedback-vector.h"
#include "src/objects/objects-inl.h"
#include "src/objects/oddball.h"
#include "src/objects/property-cell.h"
#include "src/objects/scope-info.h"
#include "src/objects/slots-inl.h"
#include "src/objects/struct-inl.h"
#include "src/objects/visitors-inl.h"
#include "src/profiler/heap-profiler.h"
#include "src/roots/static-roots.h"
#include "src/strings/string-hasher.h"
#include "src/utils/ostreams.h"
#include "src/zone/zone-list-inl.h"
namespace v8 {
namespace internal {
template <typename T>
Tagged<T> ForwardingAddress(Tagged<T> heap_obj) { … }
base::EnumSet<CodeFlushMode> Heap::GetCodeFlushMode(Isolate* isolate) { … }
Isolate* Heap::isolate() const { … }
bool Heap::IsMainThread() const { … }
int64_t Heap::external_memory() { … }
int64_t Heap::update_external_memory(int64_t delta) { … }
RootsTable& Heap::roots_table() { … }
#define ROOT_ACCESSOR …
MUTABLE_ROOT_LIST(…)
#undef ROOT_ACCESSOR
Tagged<FixedArray> Heap::single_character_string_table() { … }
#define STATIC_ROOTS_FAILED_MSG …
#if V8_STATIC_ROOTS_BOOL
#define DCHECK_STATIC_ROOT(obj, name) …
#else
#define DCHECK_STATIC_ROOT …
#endif
#define ROOT_ACCESSOR …
ROOT_LIST(…)
#undef ROOT_ACCESSOR
#undef CHECK_STATIC_ROOT
#undef STATIC_ROOTS_FAILED_MSG
void Heap::SetRootMaterializedObjects(Tagged<FixedArray> objects) { … }
void Heap::SetRootScriptList(Tagged<Object> value) { … }
void Heap::SetMessageListeners(Tagged<ArrayList> value) { … }
void Heap::SetFunctionsMarkedForManualOptimization(Tagged<Object> hash_table) { … }
#if V8_ENABLE_WEBASSEMBLY
void Heap::SetWasmCanonicalRtts(Tagged<WeakArrayList> value) { … }
void Heap::SetJSToWasmWrappers(Tagged<WeakArrayList> value) { … }
#endif
PagedSpace* Heap::paged_space(int idx) const { … }
Space* Heap::space(int idx) const { … }
Address* Heap::NewSpaceAllocationTopAddress() { … }
Address* Heap::NewSpaceAllocationLimitAddress() { … }
Address* Heap::OldSpaceAllocationTopAddress() { … }
Address* Heap::OldSpaceAllocationLimitAddress() { … }
inline const base::AddressRegion& Heap::code_region() { … }
Address Heap::code_range_base() { … }
int Heap::MaxRegularHeapObjectSize(AllocationType allocation) { … }
AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type,
AllocationOrigin origin,
AllocationAlignment alignment) { … }
Address Heap::AllocateRawOrFail(int size, AllocationType allocation,
AllocationOrigin origin,
AllocationAlignment alignment) { … }
void Heap::RegisterExternalString(Tagged<String> string) { … }
void Heap::FinalizeExternalString(Tagged<String> string) { … }
Address Heap::NewSpaceTop() { … }
Address Heap::NewSpaceLimit() { … }
bool Heap::InYoungGeneration(Tagged<Object> object) { … }
bool Heap::InYoungGeneration(Tagged<MaybeObject> object) { … }
bool Heap::InYoungGeneration(Tagged<HeapObject> heap_object) { … }
bool Heap::InFromPage(Tagged<Object> object) { … }
bool Heap::InFromPage(Tagged<MaybeObject> object) { … }
bool Heap::InFromPage(Tagged<HeapObject> heap_object) { … }
bool Heap::InToPage(Tagged<Object> object) { … }
bool Heap::InToPage(Tagged<MaybeObject> object) { … }
bool Heap::InToPage(Tagged<HeapObject> heap_object) { … }
bool Heap::InOldSpace(Tagged<Object> object) { … }
Heap* Heap::FromWritableHeapObject(Tagged<HeapObject> obj) { … }
void Heap::CopyBlock(Address dst, Address src, int byte_size) { … }
bool Heap::IsPendingAllocationInternal(Tagged<HeapObject> object) { … }
bool Heap::IsPendingAllocation(Tagged<HeapObject> object) { … }
bool Heap::IsPendingAllocation(Tagged<Object> object) { … }
void Heap::ExternalStringTable::AddString(Tagged<String> string) { … }
Tagged<Boolean> Heap::ToBoolean(bool condition) { … }
int Heap::NextScriptId() { … }
int Heap::NextDebuggingId() { … }
int Heap::GetNextTemplateSerialNumber() { … }
int Heap::MaxNumberToStringCacheSize() const { … }
void Heap::IncrementExternalBackingStoreBytes(ExternalBackingStoreType type,
size_t amount) { … }
void Heap::DecrementExternalBackingStoreBytes(ExternalBackingStoreType type,
size_t amount) { … }
bool Heap::HasDirtyJSFinalizationRegistries() { … }
AlwaysAllocateScope::AlwaysAllocateScope(Heap* heap) : … { … }
AlwaysAllocateScope::~AlwaysAllocateScope() { … }
AlwaysAllocateScopeForTesting::AlwaysAllocateScopeForTesting(Heap* heap)
: … { … }
PagedNewSpace* Heap::paged_new_space() const { … }
SemiSpaceNewSpace* Heap::semi_space_new_space() const { … }
StickySpace* Heap::sticky_space() const { … }
IgnoreLocalGCRequests::IgnoreLocalGCRequests(Heap* heap) : … { … }
IgnoreLocalGCRequests::~IgnoreLocalGCRequests() { … }
}
}
#endif