v8  9.0.257(node16.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 constexpr V8_INLINE internal::Address IntToSmi (int value)
 
static constexpr V8_INLINE 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::Isolate * GetIsolateForHeapSandbox (internal::Address obj)
 
static V8_INLINE Address DecodeExternalPointer (const Isolate *isolate, ExternalPointer_t encoded_pointer, ExternalPointerTag tag)
 
static V8_INLINE internal::Address ReadExternalPointerField (internal::Isolate *isolate, internal::Address heap_object_ptr, int offset, ExternalPointerTag tag)
 

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 kJSObjectHeaderSize = 3 * kApiTaggedSize
 
static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
 
static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
 
static const int kEmbedderDataSlotSize = kApiSystemPointerSize
 
static const int kNativeContextEmbedderDataOffset = 6 * 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 kIsolateFastCCallCallerFpOffset
 
static const int kIsolateFastCCallCallerPcOffset
 
static const int kIsolateFastApiCallTargetOffset
 
static const int kIsolateStackGuardOffset
 
static const int kIsolateRootsOffset
 
static const int kExternalPointerTableBufferOffset = 0
 
static const int kExternalPointerTableLengthOffset
 
static const int kExternalPointerTableCapacityOffset
 
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 kFirstNonstringType = 0x40
 
static const int kOddballType = 0x43
 
static const int kForeignType = 0x46
 
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 179 of file v8-internal.h.

Member Function Documentation

◆ CheckInitialized()

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

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

Referenced by String::Empty(), v8::False(), v8::Null(), v8::True(), and v8::Undefined().

◆ CheckInitializedImpl()

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

◆ DecodeExternalPointer()

static V8_INLINE Address DecodeExternalPointer ( const Isolate isolate,
ExternalPointer_t  encoded_pointer,
ExternalPointerTag  tag 
)
inlinestatic

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

◆ GetEmbedderData()

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

◆ GetInstanceType()

◆ GetIsolateForHeapSandbox()

◆ GetNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

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

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

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

Referenced by PersistentBase< T >::IsWeak().

◆ GetOddballKind()

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

◆ GetRoot()

◆ HasHeapObjectTag()

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

◆ IntToSmi()

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

◆ IsExternalTwoByteString()

static V8_INLINE bool IsExternalTwoByteString ( int  instance_type)
inlinestatic

◆ IsValidSmi()

static constexpr V8_INLINE bool IsValidSmi ( intptr_t  value)
inlinestaticconstexpr

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

References SmiTagging< 8 >::IsValidSmi().

Referenced by ReturnValue< T >::Set().

◆ ReadExternalPointerField()

static V8_INLINE internal::Address ReadExternalPointerField ( internal::Isolate *  isolate,
internal::Address  heap_object_ptr,
int  offset,
ExternalPointerTag  tag 
)
inlinestatic

◆ ReadRawField()

◆ ReadTaggedPointerField()

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

◆ ReadTaggedSignedField()

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

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

References Internals::ReadRawField().

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 267 of file v8-internal.h.

References SmiTagging< 8 >::SmiToInt().

Referenced by Internals::GetOddballKind().

◆ UpdateNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

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

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

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

Field Documentation

◆ kDontThrow

const int kDontThrow = 1
static

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

Referenced by PropertyCallbackInfo< Value >::ShouldThrowOnError().

◆ kEmbedderDataArrayHeaderSize

const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
static

◆ kEmbedderDataSlotSize

◆ kEmptyStringRootIndex

const int kEmptyStringRootIndex = 9
static

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

Referenced by String::Empty(), and ReturnValue< T >::SetEmptyString().

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
staticconstexpr

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

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kExternalPointerTableBufferOffset

const int kExternalPointerTableBufferOffset = 0
static

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

◆ kExternalPointerTableCapacityOffset

const int kExternalPointerTableCapacityOffset
static
Initial value:

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

◆ kExternalPointerTableLengthOffset

const int kExternalPointerTableLengthOffset
static
Initial value:

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

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

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

Referenced by v8::False(), and ReturnValue< T >::Set().

◆ kFirstNonstringType

const int kFirstNonstringType = 0x40
static

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

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kForeignType

const int kForeignType = 0x46
static

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

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x0f
static

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

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

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

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

Referenced by PropertyCallbackInfo< Value >::ShouldThrowOnError().

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0
static

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

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

◆ kIsolateFastApiCallTargetOffset

const int kIsolateFastApiCallTargetOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerFpOffset

const int kIsolateFastCCallCallerFpOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerPcOffset

const int kIsolateFastCCallCallerPcOffset
static
Initial value:

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

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

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

Referenced by Internals::GetRoot().

◆ kIsolateStackGuardOffset

const int kIsolateStackGuardOffset
static
Initial value:

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

◆ kJSApiObjectType

const int kJSApiObjectType = 0x420
static

◆ kJSObjectHeaderSize

const int kJSObjectHeaderSize = 3 * kApiTaggedSize
static

◆ kJSObjectType

const int kJSObjectType = 0x421
static

◆ kJSSpecialApiObjectType

const int kJSSpecialApiObjectType = 0x410
static

◆ kMapInstanceTypeOffset

const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size
static

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

Referenced by Internals::GetInstanceType().

◆ kNativeContextEmbedderDataOffset

const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize
static

◆ kNodeClassIdOffset

◆ kNodeFlagsOffset

const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3
static

◆ kNodeStateIsPendingValue

const int kNodeStateIsPendingValue = 3
static

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

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

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

Referenced by PersistentBase< T >::IsWeak().

◆ kNodeStateMask

const int kNodeStateMask = 0x7
static

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

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

◆ kNullOddballKind

const int kNullOddballKind = 3
static

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

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

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

Referenced by v8::Null(), and ReturnValue< T >::SetNull().

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

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

Referenced by Isolate::GetNumberOfDataSlots().

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

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

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x43
static

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

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kStringResourceOffset

const int kStringResourceOffset
static
Initial value:

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

Referenced by String::GetExternalStringResource(), and String::GetExternalStringResourceBase().

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

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

Referenced by ReturnValue< T >::Get().

◆ kThrowOnError

const int kThrowOnError = 0
static

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

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

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

Referenced by ReturnValue< T >::Set(), and v8::True().

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

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

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

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

Referenced by ReturnValue< T >::SetUndefined(), and v8::Undefined().


The documentation for this class was generated from the following file:
v8::internal::kApiSystemPointerSize
const int kApiSystemPointerSize
Definition: v8-internal.h:32
v8::internal::Internals::kIsolateFastCCallCallerPcOffset
static const int kIsolateFastCCallCallerPcOffset
Definition: v8-internal.h:208
v8::internal::Internals::kIsolateStackGuardOffset
static const int kIsolateStackGuardOffset
Definition: v8-internal.h:212
v8::internal::Internals::kIsolateFastApiCallTargetOffset
static const int kIsolateFastApiCallTargetOffset
Definition: v8-internal.h:210
v8::internal::Internals::kIsolateFastCCallCallerFpOffset
static const int kIsolateFastCCallCallerFpOffset
Definition: v8-internal.h:206
v8::internal::kApiInt32Size
const int kApiInt32Size
Definition: v8-internal.h:34
v8::internal::Internals::kExternalPointerTableLengthOffset
static const int kExternalPointerTableLengthOffset
Definition: v8-internal.h:218
v8::internal::kApiTaggedSize
const int kApiTaggedSize
Definition: v8-internal.h:106
v8::internal::Internals::kNumIsolateDataSlots
static const uint32_t kNumIsolateDataSlots
Definition: v8-internal.h:202
v8::internal::Internals::kExternalPointerTableBufferOffset
static const int kExternalPointerTableBufferOffset
Definition: v8-internal.h:217