v8  7.4.288(node12.0.0)
V8 is Google's open source JavaScript engine
Internals Class Reference

#include <v8-internal.h>

Static Public Member Functions

static V8_EXPORT void CheckInitializedImpl (v8::Isolate *isolate)
 
static V8_INLINE void CheckInitialized (v8::Isolate *isolate)
 
static V8_INLINE bool HasHeapObjectTag (const internal::Address value)
 
static V8_INLINE int SmiValue (const internal::Address value)
 
static V8_INLINE constexpr internal::Address IntToSmi (int value)
 
static V8_INLINE constexpr bool IsValidSmi (intptr_t value)
 
static V8_INLINE int GetInstanceType (const internal::Address obj)
 
static V8_INLINE int GetOddballKind (const internal::Address obj)
 
static V8_INLINE bool IsExternalTwoByteString (int instance_type)
 
static V8_INLINE uint8_t GetNodeFlag (internal::Address *obj, int shift)
 
static V8_INLINE void UpdateNodeFlag (internal::Address *obj, bool value, int shift)
 
static V8_INLINE uint8_t GetNodeState (internal::Address *obj)
 
static V8_INLINE void UpdateNodeState (internal::Address *obj, uint8_t value)
 
static V8_INLINE void SetEmbedderData (v8::Isolate *isolate, uint32_t slot, void *data)
 
static V8_INLINE void * GetEmbedderData (const v8::Isolate *isolate, uint32_t slot)
 
static V8_INLINE internal::AddressGetRoot (v8::Isolate *isolate, int index)
 
template<typename T >
static V8_INLINEReadRawField (internal::Address heap_object_ptr, int offset)
 
static V8_INLINE internal::Address ReadTaggedPointerField (internal::Address heap_object_ptr, int offset)
 
static V8_INLINE internal::Address ReadTaggedSignedField (internal::Address heap_object_ptr, int offset)
 
static V8_INLINE internal::Address ReadTaggedAnyField (internal::Address heap_object_ptr, int offset)
 
template<typename T >
static V8_INLINEReadEmbedderData (const v8::Context *context, int index)
 

Static Public Attributes

static const int kHeapObjectMapOffset = 0
 
static const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size
 
static const int kStringResourceOffset
 
static const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
 
static const int kForeignAddressOffset = kApiTaggedSize
 
static const int kJSObjectHeaderSize = 3 * kApiTaggedSize
 
static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
 
static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
 
static const int kEmbedderDataSlotSize
 
static const int kNativeContextEmbedderDataOffset = 7 * kApiTaggedSize
 
static const int kFullStringRepresentationMask = 0x0f
 
static const int kStringEncodingMask = 0x8
 
static const int kExternalTwoByteRepresentationTag = 0x02
 
static const int kExternalOneByteRepresentationTag = 0x0a
 
static const uint32_t kNumIsolateDataSlots = 4
 
static const int kIsolateEmbedderDataOffset = 0
 
static const int kExternalMemoryOffset
 
static const int kExternalMemoryLimitOffset
 
static const int kExternalMemoryAtLastMarkCompactOffset
 
static const int kIsolateRootsOffset
 
static const int kUndefinedValueRootIndex = 4
 
static const int kTheHoleValueRootIndex = 5
 
static const int kNullValueRootIndex = 6
 
static const int kTrueValueRootIndex = 7
 
static const int kFalseValueRootIndex = 8
 
static const int kEmptyStringRootIndex = 9
 
static const int kNodeClassIdOffset = 1 * kApiSystemPointerSize
 
static const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3
 
static const int kNodeStateMask = 0x7
 
static const int kNodeStateIsWeakValue = 2
 
static const int kNodeStateIsPendingValue = 3
 
static const int kNodeStateIsNearDeathValue = 4
 
static const int kNodeIsIndependentShift = 3
 
static const int kNodeIsActiveShift = 4
 
static const int kFirstNonstringType = 0x40
 
static const int kOddballType = 0x43
 
static const int kForeignType = 0x47
 
static const int kJSSpecialApiObjectType = 0x410
 
static const int kJSApiObjectType = 0x420
 
static const int kJSObjectType = 0x421
 
static const int kUndefinedOddballKind = 5
 
static const int kNullOddballKind = 3
 
static const int kThrowOnError = 0
 
static const int kDontThrow = 1
 
static const int kInferShouldThrowMode = 2
 
static constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
 

Detailed Description

This class exports constants and functionality from within v8 that is necessary to implement inline functions in the v8 api. Don't depend on functions and constants defined here.

Definition at line 120 of file v8-internal.h.

Member Function Documentation

◆ CheckInitialized()

static V8_INLINE void CheckInitialized ( v8::Isolate isolate)
inlinestatic

Definition at line 194 of file v8-internal.h.

References Internals::CheckInitializedImpl().

◆ CheckInitializedImpl()

static V8_EXPORT void CheckInitializedImpl ( v8::Isolate isolate)
static

◆ GetEmbedderData()

static V8_INLINE void* GetEmbedderData ( const v8::Isolate isolate,
uint32_t  slot 
)
inlinestatic

◆ GetInstanceType()

static V8_INLINE int GetInstanceType ( const internal::Address  obj)
inlinestatic

◆ GetNodeFlag()

static V8_INLINE uint8_t GetNodeFlag ( internal::Address obj,
int  shift 
)
inlinestatic

Definition at line 231 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

static V8_INLINE uint8_t GetNodeState ( internal::Address obj)
inlinestatic

Definition at line 243 of file v8-internal.h.

References Internals::kNodeFlagsOffset, and Internals::kNodeStateMask.

◆ GetOddballKind()

static V8_INLINE int GetOddballKind ( const internal::Address  obj)
inlinestatic

◆ GetRoot()

static V8_INLINE internal::Address* GetRoot ( v8::Isolate isolate,
int  index 
)
inlinestatic

◆ HasHeapObjectTag()

static V8_INLINE bool HasHeapObjectTag ( const internal::Address  value)
inlinestatic

◆ IntToSmi()

static V8_INLINE constexpr internal::Address IntToSmi ( int  value)
inlinestatic

Definition at line 208 of file v8-internal.h.

◆ IsExternalTwoByteString()

static V8_INLINE bool IsExternalTwoByteString ( int  instance_type)
inlinestatic

◆ IsValidSmi()

static V8_INLINE constexpr bool IsValidSmi ( intptr_t  value)
inlinestatic

Definition at line 212 of file v8-internal.h.

◆ ReadEmbedderData()

static V8_INLINE T ReadEmbedderData ( const v8::Context context,
int  index 
)
inlinestatic

Definition at line 334 of file v8-internal.h.

◆ ReadRawField()

static V8_INLINE T ReadRawField ( internal::Address  heap_object_ptr,
int  offset 
)
inlinestatic

Definition at line 277 of file v8-internal.h.

References v8::internal::kHeapObjectTag.

◆ ReadTaggedAnyField()

static V8_INLINE internal::Address ReadTaggedAnyField ( internal::Address  heap_object_ptr,
int  offset 
)
inlinestatic

Definition at line 304 of file v8-internal.h.

References v8::internal::kSmiTagMask.

◆ ReadTaggedPointerField()

static V8_INLINE internal::Address ReadTaggedPointerField ( internal::Address  heap_object_ptr,
int  offset 
)
inlinestatic

Definition at line 283 of file v8-internal.h.

Referenced by Internals::GetInstanceType().

◆ ReadTaggedSignedField()

static V8_INLINE internal::Address ReadTaggedSignedField ( internal::Address  heap_object_ptr,
int  offset 
)
inlinestatic

Definition at line 294 of file v8-internal.h.

Referenced by Internals::GetOddballKind().

◆ SetEmbedderData()

static V8_INLINE void SetEmbedderData ( v8::Isolate isolate,
uint32_t  slot,
void *  data 
)
inlinestatic

◆ SmiValue()

static V8_INLINE int SmiValue ( const internal::Address  value)
inlinestatic

Definition at line 204 of file v8-internal.h.

Referenced by Internals::GetOddballKind().

◆ UpdateNodeFlag()

static V8_INLINE void UpdateNodeFlag ( internal::Address obj,
bool  value,
int  shift 
)
inlinestatic

Definition at line 236 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

static V8_INLINE void UpdateNodeState ( internal::Address obj,
uint8_t  value 
)
inlinestatic

Definition at line 248 of file v8-internal.h.

References Internals::kNodeFlagsOffset, and Internals::kNodeStateMask.

Field Documentation

◆ kDontThrow

const int kDontThrow = 1
static

Definition at line 186 of file v8-internal.h.

◆ kEmbedderDataArrayHeaderSize

const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
static

Definition at line 133 of file v8-internal.h.

◆ kEmbedderDataSlotSize

const int kEmbedderDataSlotSize
static
Initial value:

Definition at line 134 of file v8-internal.h.

◆ kEmptyStringRootIndex

const int kEmptyStringRootIndex = 9
static

Definition at line 162 of file v8-internal.h.

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
static

Definition at line 191 of file v8-internal.h.

◆ kExternalMemoryAtLastMarkCompactOffset

const int kExternalMemoryAtLastMarkCompactOffset
static
Initial value:

Definition at line 152 of file v8-internal.h.

◆ kExternalMemoryLimitOffset

const int kExternalMemoryLimitOffset
static
Initial value:

Definition at line 150 of file v8-internal.h.

◆ kExternalMemoryOffset

const int kExternalMemoryOffset
static
Initial value:

Definition at line 148 of file v8-internal.h.

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

Definition at line 143 of file v8-internal.h.

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

Definition at line 142 of file v8-internal.h.

Referenced by Internals::IsExternalTwoByteString().

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

Definition at line 161 of file v8-internal.h.

◆ kFirstNonstringType

const int kFirstNonstringType = 0x40
static

Definition at line 173 of file v8-internal.h.

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

Definition at line 132 of file v8-internal.h.

◆ kForeignAddressOffset

const int kForeignAddressOffset = kApiTaggedSize
static

Definition at line 130 of file v8-internal.h.

◆ kForeignType

const int kForeignType = 0x47
static

Definition at line 175 of file v8-internal.h.

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x0f
static

Definition at line 140 of file v8-internal.h.

Referenced by Internals::IsExternalTwoByteString().

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

Definition at line 124 of file v8-internal.h.

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

Definition at line 187 of file v8-internal.h.

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0
static

Definition at line 147 of file v8-internal.h.

Referenced by Internals::GetEmbedderData(), and Internals::SetEmbedderData().

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

Definition at line 154 of file v8-internal.h.

Referenced by Internals::GetRoot().

◆ kJSApiObjectType

const int kJSApiObjectType = 0x420
static

Definition at line 177 of file v8-internal.h.

◆ kJSObjectHeaderSize

const int kJSObjectHeaderSize = 3 * kApiTaggedSize
static

Definition at line 131 of file v8-internal.h.

◆ kJSObjectType

const int kJSObjectType = 0x421
static

Definition at line 178 of file v8-internal.h.

◆ kJSSpecialApiObjectType

const int kJSSpecialApiObjectType = 0x410
static

Definition at line 176 of file v8-internal.h.

◆ kMapInstanceTypeOffset

const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size
static

Definition at line 125 of file v8-internal.h.

Referenced by Internals::GetInstanceType().

◆ kNativeContextEmbedderDataOffset

const int kNativeContextEmbedderDataOffset = 7 * kApiTaggedSize
static

Definition at line 139 of file v8-internal.h.

◆ kNodeClassIdOffset

const int kNodeClassIdOffset = 1 * kApiSystemPointerSize
static

Definition at line 164 of file v8-internal.h.

◆ kNodeFlagsOffset

const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3
static

◆ kNodeIsActiveShift

const int kNodeIsActiveShift = 4
static

Definition at line 171 of file v8-internal.h.

◆ kNodeIsIndependentShift

const int kNodeIsIndependentShift = 3
static

Definition at line 170 of file v8-internal.h.

◆ kNodeStateIsNearDeathValue

const int kNodeStateIsNearDeathValue = 4
static

Definition at line 169 of file v8-internal.h.

◆ kNodeStateIsPendingValue

const int kNodeStateIsPendingValue = 3
static

Definition at line 168 of file v8-internal.h.

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

Definition at line 167 of file v8-internal.h.

◆ kNodeStateMask

const int kNodeStateMask = 0x7
static

Definition at line 166 of file v8-internal.h.

Referenced by Internals::GetNodeState(), and Internals::UpdateNodeState().

◆ kNullOddballKind

const int kNullOddballKind = 3
static

Definition at line 181 of file v8-internal.h.

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

Definition at line 159 of file v8-internal.h.

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

Definition at line 145 of file v8-internal.h.

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

Definition at line 129 of file v8-internal.h.

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x43
static

Definition at line 174 of file v8-internal.h.

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

Definition at line 141 of file v8-internal.h.

◆ kStringResourceOffset

const int kStringResourceOffset
static
Initial value:

Definition at line 126 of file v8-internal.h.

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

Definition at line 158 of file v8-internal.h.

◆ kThrowOnError

const int kThrowOnError = 0
static

Definition at line 185 of file v8-internal.h.

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

Definition at line 160 of file v8-internal.h.

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

Definition at line 180 of file v8-internal.h.

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

Definition at line 157 of file v8-internal.h.


The documentation for this class was generated from the following file: