v8  9.4.146 (node 16.13.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 void IncrementLongTasksStatsCounter (v8::Isolate *isolate)
 
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 kIsolateCageBaseOffset
 
static const int kIsolateLongTaskStatsCounterOffset
 
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 kJSObjectType = 0x421
 
static const int kFirstJSApiObjectType = 0x422
 
static const int kLastJSApiObjectType = 0x80A
 
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 198 of file v8-internal.h.

Member Function Documentation

◆ CheckInitialized()

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

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

Referenced by String::Empty().

◆ 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 441 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 340 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

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

Definition at line 352 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

◆ IncrementLongTasksStatsCounter()

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

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

References Internals::kIsolateLongTaskStatsCounterOffset.

Referenced by LongTaskStats::Reset().

◆ 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 318 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 421 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 310 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 345 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

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

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

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

Field Documentation

◆ kDontThrow

const int kDontThrow = 1
static

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

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

◆ kEmbedderDataArrayHeaderSize

const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
static

◆ kEmbedderDataSlotSize

◆ kEmptyStringRootIndex

const int kEmptyStringRootIndex = 9
static

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

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

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
staticconstexpr

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

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kExternalPointerTableBufferOffset

const int kExternalPointerTableBufferOffset = 0
static

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

◆ kExternalPointerTableCapacityOffset

const int kExternalPointerTableCapacityOffset
static
Initial value:

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

◆ kExternalPointerTableLengthOffset

const int kExternalPointerTableLengthOffset
static
Initial value:

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

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

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

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

◆ kFirstJSApiObjectType

const int kFirstJSApiObjectType = 0x422
static

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

◆ kFirstNonstringType

const int kFirstNonstringType = 0x40
static

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

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kForeignType

const int kForeignType = 0x46
static

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

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x0f
static

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

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

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

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

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

◆ kIsolateCageBaseOffset

const int kIsolateCageBaseOffset
static
Initial value:

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

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0
static

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

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

◆ kIsolateFastApiCallTargetOffset

const int kIsolateFastApiCallTargetOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerFpOffset

const int kIsolateFastCCallCallerFpOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerPcOffset

const int kIsolateFastCCallCallerPcOffset
static
Initial value:

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

◆ kIsolateLongTaskStatsCounterOffset

const int kIsolateLongTaskStatsCounterOffset
static
Initial value:

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

Referenced by Internals::IncrementLongTasksStatsCounter().

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

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

Referenced by Internals::GetRoot().

◆ kIsolateStackGuardOffset

const int kIsolateStackGuardOffset
static
Initial value:

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

◆ kJSObjectHeaderSize

const int kJSObjectHeaderSize = 3 * kApiTaggedSize
static

◆ kJSObjectType

const int kJSObjectType = 0x421
static

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

◆ kJSSpecialApiObjectType

const int kJSSpecialApiObjectType = 0x410
static

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

◆ kLastJSApiObjectType

const int kLastJSApiObjectType = 0x80A
static

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

◆ kMapInstanceTypeOffset

const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size
static

Definition at line 211 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 265 of file v8-internal.h.

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

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

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

◆ kNodeStateMask

const int kNodeStateMask = 0x7
static

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

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

◆ kNullOddballKind

const int kNullOddballKind = 3
static

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

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

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

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

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

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

Referenced by Isolate::GetNumberOfDataSlots().

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

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

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x43
static

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

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kStringResourceOffset

const int kStringResourceOffset
static
Initial value:
=
const int kApiTaggedSize
Definition: v8-internal.h:117

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

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

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

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

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

◆ kThrowOnError

const int kThrowOnError = 0
static

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

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

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

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

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

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

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

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

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


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