v8
9.4.146 (node 16.13.0)
V8 is Google's open source JavaScript engine
|
Namespaces | |
internal | |
subtle | |
testing | |
Data Structures | |
class | MakeGarbageCollectedTraitBase |
struct | AdditionalBytes |
class | MakeGarbageCollectedTrait |
struct | PostConstructionCallbackTrait |
struct | CustomSpaceIndex |
class | CustomSpaceBase |
class | CustomSpace |
struct | SpaceTrait |
class | DefaultPlatform |
struct | EphemeronPair |
class | GarbageCollected |
class | GarbageCollectedMixin |
struct | HeapStatistics |
class | Heap |
class | LivenessBroker |
class | NameProvider |
class | Platform |
class | ProcessHeapStatistics |
class | SourceLocation |
struct | TraceDescriptor |
struct | TraceTrait |
class | Visitor |
struct | TraceTrait< v8::TracedReference< T > > |
Enumerations | |
enum class | EmbedderStackState { kMayContainHeapPointers , kNoHeapPointers } |
Functions | |
template<typename T , typename... Args> | |
T * | MakeGarbageCollected (AllocationHandle &handle, Args &&... args) |
template<typename T , typename... Args> | |
T * | MakeGarbageCollected (AllocationHandle &handle, AdditionalBytes additional_bytes, Args &&... args) |
V8_EXPORT void | InitializeProcess (PageAllocator *page_allocator) |
V8_EXPORT void | ShutdownProcess () |
Variables | |
constexpr internal::SentinelPointer | kSentinelPointer |
template<typename T > | |
constexpr bool | IsGarbageCollectedMixinTypeV |
template<typename T > | |
constexpr bool | IsGarbageCollectedTypeV |
template<typename T > | |
constexpr bool | IsGarbageCollectedOrMixinTypeV |
template<typename T > | |
constexpr bool | IsGarbageCollectedWithMixinTypeV |
template<typename T > | |
constexpr bool | IsMemberTypeV = internal::IsMemberType<T>::value |
template<typename T > | |
constexpr bool | IsUntracedMemberTypeV = internal::IsUntracedMemberType<T>::value |
template<typename T > | |
constexpr bool | IsWeakMemberTypeV = internal::IsWeakMemberType<T>::value |
template<typename T > | |
constexpr bool | IsWeakV = internal::IsWeak<T>::value |
template<typename T > | |
constexpr bool | IsCompleteV = internal::IsComplete<T>::value |
cppgc - A C++ garbage collection library.
using IdleTask = v8::IdleTask |
Definition at line 17 of file platform.h.
using JobDelegate = v8::JobDelegate |
Definition at line 19 of file platform.h.
using JobHandle = v8::JobHandle |
Definition at line 18 of file platform.h.
using JobTask = v8::JobTask |
Definition at line 20 of file platform.h.
using Member = internal::BasicMember<T, internal::StrongMemberTag, internal::DijkstraWriteBarrierPolicy> |
using PageAllocator = v8::PageAllocator |
Definition at line 21 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 356 of file persistent.h.
Definition at line 22 of file platform.h.
using TaskPriority = v8::TaskPriority |
Definition at line 23 of file platform.h.
using TaskRunner = v8::TaskRunner |
Definition at line 24 of file platform.h.
using TraceCallback = void (*)(Visitor* visitor, const void* object) |
Callback for invoking tracing on a given object.
visitor | The visitor to dispatch to. |
object | The object to invoke tracing on. |
Definition at line 34 of file trace-trait.h.
Definition at line 25 of file platform.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 366 of file persistent.h.
|
strong |
V8_EXPORT void cppgc::InitializeProcess | ( | PageAllocator * | page_allocator | ) |
Process-global initialization of the garbage collector. Must be called before creating a Heap.
Can be called multiple times when paired with ShutdownProcess()
.
page_allocator | The allocator used for maintaining meta data. Must not change between multiple calls to InitializeProcess. |
T* cppgc::MakeGarbageCollected | ( | AllocationHandle & | handle, |
AdditionalBytes | additional_bytes, | ||
Args &&... | args | ||
) |
Constructs a managed object of type T where T transitively inherits from GarbageCollected. Created objects will have additional bytes appended to it. Allocated memory would suffice for sizeof(T) + additional_bytes
.
additional_bytes | Denotes how many bytes to append to T. |
args | List of arguments with which an instance of T will be constructed. |
Definition at line 223 of file allocation.h.
T* cppgc::MakeGarbageCollected | ( | AllocationHandle & | handle, |
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 205 of file allocation.h.
V8_EXPORT void cppgc::ShutdownProcess | ( | ) |
Must be called after destroying the last used heap. Some process-global metadata may not be returned and reused upon a subsequent InitializeProcess()
call.
|
constexpr |
Value is true for types that are complete, and false otherwise.
Definition at line 243 of file type-traits.h.
|
constexpr |
Value is true for types that inherit from GarbageCollectedMixin
but not GarbageCollected<T>
(i.e., they are free mixins), and false otherwise.
Definition at line 187 of file type-traits.h.
|
constexpr |
Value is true for types that inherit from either GarbageCollected<T>
or GarbageCollectedMixin
, and false otherwise.
Definition at line 203 of file type-traits.h.
|
constexpr |
Value is true for types that inherit from GarbageCollected<T>
, and false otherwise.
Definition at line 195 of file type-traits.h.
|
constexpr |
Value is true for types that inherit from GarbageCollected<T>
and GarbageCollectedMixin
, and false otherwise.
Definition at line 211 of file type-traits.h.
|
constexpr |
Value is true for types of type Member<T>
, and false otherwise.
Definition at line 218 of file type-traits.h.
|
constexpr |
Value is true for types of type UntracedMember<T>
, and false otherwise.
Definition at line 224 of file type-traits.h.
|
constexpr |
Value is true for types of type WeakMember<T>
, and false otherwise.
Definition at line 230 of file type-traits.h.
|
constexpr |
Value is true for types that are considered weak references, and false otherwise.
Definition at line 237 of file type-traits.h.
|
constexpr |