v8  8.1.307(node14.1.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 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 = 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 kExternalMemoryOffset
 
static const int kExternalMemoryLimitOffset
 
static const int kExternalMemoryAtLastMarkCompactOffset
 
static const int kIsolateFastCCallCallerFpOffset
 
static const int kIsolateFastCCallCallerPcOffset
 
static const int kIsolateStackGuardOffset
 
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 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 134 of file v8-internal.h.

Member Function Documentation

◆ CheckInitialized()

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

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

◆ GetEmbedderData()

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

◆ GetInstanceType()

◆ GetNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

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

◆ 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 V8_INLINE constexpr internal::Address IntToSmi ( int  value)
inlinestatic

◆ IsExternalTwoByteString()

static V8_INLINE bool IsExternalTwoByteString ( int  instance_type)
inlinestatic

◆ IsValidSmi()

static V8_INLINE constexpr bool IsValidSmi ( intptr_t  value)
inlinestatic

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

References SmiTagging< 8 >::IsValidSmi().

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

◆ 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 319 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 218 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 250 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

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

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

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

Field Documentation

◆ kDontThrow

const int kDontThrow = 1
static

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

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

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
static

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

Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory().

◆ kExternalMemoryAtLastMarkCompactOffset

const int kExternalMemoryAtLastMarkCompactOffset
static

◆ kExternalMemoryLimitOffset

const int kExternalMemoryLimitOffset
static
Initial value:

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

Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory().

◆ kExternalMemoryOffset

const int kExternalMemoryOffset
static

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

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

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

◆ kFirstNonstringType

const int kFirstNonstringType = 0x40
static

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

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kForeignAddressOffset

const int kForeignAddressOffset = kApiTaggedSize
static

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

◆ kForeignType

const int kForeignType = 0x46
static

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

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x0f
static

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

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

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

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

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

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0
static

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

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

◆ kIsolateFastCCallCallerFpOffset

const int kIsolateFastCCallCallerFpOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerPcOffset

const int kIsolateFastCCallCallerPcOffset
static
Initial value:

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

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

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

Referenced by Internals::GetRoot().

◆ kIsolateStackGuardOffset

const int kIsolateStackGuardOffset
static
Initial value:

Definition at line 169 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 139 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 185 of file v8-internal.h.

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

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

Referenced by PersistentBase< v8::Promise >::IsWeak().

◆ kNodeStateMask

const int kNodeStateMask = 0x7
static

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

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

◆ kNullOddballKind

const int kNullOddballKind = 3
static

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

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

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

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

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

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

Referenced by Isolate::GetNumberOfDataSlots().

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

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

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x43
static

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

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kStringResourceOffset

const int kStringResourceOffset
static
Initial value:

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

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

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

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

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

◆ kThrowOnError

const int kThrowOnError = 0
static

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

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

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

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

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

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

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

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

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


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