v8
8.4.371 (node 14.15.5)
V8 is Google's open source JavaScript engine
|
Namespaces | |
internal | |
Data Structures | |
class | MakeGarbageCollectedTraitBase |
class | MakeGarbageCollectedTrait |
struct | PostConstructionCallbackTrait |
struct | CustomSpaceIndex |
class | CustomSpaceBase |
class | CustomSpace |
struct | SpaceTrait |
class | GarbageCollected |
class | GarbageCollectedMixin |
class | Heap |
class | LivenessBroker |
class | SourceLocation |
struct | TraceDescriptor |
struct | TraceTrait |
class | Visitor |
Typedefs | |
template<typename T > | |
using | Member = internal::BasicMember< T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy > |
template<typename T > | |
using | WeakMember = internal::BasicMember< T, internal::WeakMemberTag, internal::DijkstraWriteBarrierPolicy > |
template<typename T > | |
using | UntracedMember = internal::BasicMember< T, internal::UntracedMemberTag, internal::NoWriteBarrierPolicy > |
template<typename T > | |
using | Persistent = internal::BasicPersistent< T, internal::StrongPersistentPolicy > |
template<typename T > | |
using | WeakPersistent = internal::BasicPersistent< T, internal::WeakPersistentPolicy > |
using | PageAllocator = v8::PageAllocator |
using | TraceCallback = void(*)(Visitor *, const void *) |
using | WeakCallback = void(*)(const LivenessBroker &, const void *) |
Enumerations | |
enum class | EmbedderStackState { kMayContainHeapPointers , kNoHeapPointers , V8_ENUM_DEPRECATE_SOON , V8_ENUM_DEPRECATE_SOON , V8_ENUM_DEPRECATE_SOON =("Use kNoHeapPointers") = kNoHeapPointers } |
Functions | |
template<typename T , typename... Args> | |
T * | MakeGarbageCollected (Heap *heap, Args &&... args) |
V8_EXPORT void | InitializePlatform (PageAllocator *page_allocator) |
V8_EXPORT void | ShutdownPlatform () |
Variables | |
constexpr internal::SentinelPointer | kSentinelPointer |
template<typename T > | |
constexpr bool | IsWeakV = internal::IsWeak<T>::value |
using Member = internal::BasicMember<T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy> |
using PageAllocator = v8::PageAllocator |
Definition at line 15 of file platform.h.
Persistent is a way to create a strong pointer from an off-heap object to another on-heap object. As long as the Persistent handle is alive the GC will keep the object pointed to alive. The Persistent handle is always a GC root from the point of view of the GC. Persistent must be constructed and destructed in the same thread.
Definition at line 289 of file persistent.h.
using TraceCallback = void (*)(Visitor*, const void*) |
Definition at line 24 of file trace-trait.h.
using UntracedMember = internal::BasicMember<T, internal::UntracedMemberTag, internal::NoWriteBarrierPolicy> |
UntracedMember is a pointer to an on-heap object that is not traced for some reason. Do not use this unless you know what you are doing. Keeping raw pointers to on-heap objects is prohibited unless used from stack. Pointee must be kept alive through other means.
using WeakCallback = void (*)(const LivenessBroker&, const void*) |
using WeakMember = internal::BasicMember<T, internal::WeakMemberTag, internal::DijkstraWriteBarrierPolicy> |
WeakMember is similar to Member in that it is used to point to other garbage collected objects. However instead of creating a strong pointer to the object, the WeakMember creates a weak pointer, which does not keep the pointee alive. Hence if all pointers to to a heap allocated object are weak the object will be garbage collected. At the time of GC the weak pointers will automatically be set to null.
WeakPersistent is a way to create a weak pointer from an off-heap object to an on-heap object. The pointer is automatically cleared when the pointee gets collected. WeakPersistent must be constructed and destructed in the same thread.
Definition at line 299 of file persistent.h.
|
strong |
V8_EXPORT void cppgc::InitializePlatform | ( | PageAllocator * | page_allocator | ) |
T* cppgc::MakeGarbageCollected | ( | Heap * | heap, |
Args &&... | args | ||
) |
Constructs a managed object of type T where T transitively inherits from GarbageCollected.
args | List of arguments with which an instance of T will be constructed. |
Definition at line 152 of file allocation.h.
V8_EXPORT void cppgc::ShutdownPlatform | ( | ) |
|
constexpr |
Definition at line 105 of file type-traits.h.
|
constexpr |
Definition at line 129 of file pointer-policies.h.
Referenced by LivenessBroker::IsHeapObjectAlive(), and Visitor::Trace().