5#ifndef V8_HEAP_LOCAL_HEAP_INL_H_
6#define V8_HEAP_LOCAL_HEAP_INL_H_
24#define ROOT_ACCESSOR(type, name, CamelName) \
25 inline Tagged<type> LocalHeap::name() { return heap()->name(); }
35template <
typename HeapAllocator::AllocationRetryMode mode>
53template <
typename Callback>
57#if defined(V8_ENABLE_DIRECT_HANDLE) && defined(ENABLE_SLOW_DCHECKS)
60 DirectHandleBase::ResetNumberOfHandlesScope scope;
64 if constexpr (std::is_invocable_v<Callback, const ParkedScope&>) {
71template <
typename Callback>
76 heap()->
stack().SetMarkerForBackgroundThreadAndCallback(
81template <
typename Callback>
87template <
typename Callback>
94template <
typename Callback>
98 heap()->
stack().SetMarkerForBackgroundThreadAndCallback(
107 return heap_->
stack().IsMarkerSetForBackgroundThread(
V8_WARN_UNUSED_RESULT V8_INLINE AllocationResult AllocateRaw(int size_in_bytes, AllocationType allocation, AllocationOrigin origin=AllocationOrigin::kRuntime, AllocationAlignment alignment=kTaggedAligned)
V8_WARN_UNUSED_RESULT V8_INLINE Tagged< HeapObject > AllocateRawWith(int size, AllocationType allocation, AllocationOrigin origin=AllocationOrigin::kRuntime, AllocationAlignment alignment=kTaggedAligned)
V8_EXPORT_PRIVATE::heap::base::Stack & stack()
V8_WARN_UNUSED_RESULT AllocationResult AllocateRaw(int size_in_bytes, AllocationType allocation, AllocationOrigin origin=AllocationOrigin::kRuntime, AllocationAlignment alignment=kTaggedAligned)
bool is_main_thread() const
V8_INLINE void ExecuteBackgroundThreadWhileParked(Callback callback)
Tagged< HeapObject > AllocateRawWith(int size_in_bytes, AllocationType allocation, AllocationOrigin origin=AllocationOrigin::kRuntime, AllocationAlignment alignment=kTaggedAligned)
V8_INLINE bool is_in_trampoline() const
V8_INLINE void ParkAndExecuteCallback(Callback callback)
V8_INLINE void ExecuteWhileParked(Callback callback)
HeapAllocator heap_allocator_
V8_INLINE void ExecuteMainThreadWhileParked(Callback callback)
V8_WARN_UNUSED_RESULT Address AllocateRawOrFail(int size_in_bytes, AllocationType allocation, AllocationOrigin origin=AllocationOrigin::kRuntime, AllocationAlignment alignment=kTaggedAligned)
V8_INLINE void ExecuteWithStackMarker(Callback callback)
static ThreadId Current()
#define ALIGN_TO_ALLOCATION_ALIGNMENT(value)
#define ROOT_ACCESSOR(Type, name, CamelName)
#define MUTABLE_ROOT_LIST(V)
#define DCHECK(condition)