v8  8.6.395 (node 15.0.1)
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 internal::Address ReadExternalPointerField (internal::Isolate *isolate, 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 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 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 157 of file v8-internal.h.

Member Function Documentation

◆ CheckInitialized()

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

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

Referenced by String::Empty().

◆ 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()

◆ GetIsolateForHeapSandbox()

◆ GetNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

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

Definition at line 273 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 242 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 
)
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 335 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 234 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 266 of file v8-internal.h.

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

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

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

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

Field Documentation

◆ kDontThrow

const int kDontThrow = 1
static

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

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

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
staticconstexpr

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

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

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

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

◆ kFirstNonstringType

const int kFirstNonstringType = 0x40
static

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

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kForeignType

const int kForeignType = 0x46
static

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

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x0f
static

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

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

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

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

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

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0
static

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

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

◆ kIsolateFastCCallCallerFpOffset

const int kIsolateFastCCallCallerFpOffset
static
Initial value:
=
static const uint32_t kNumIsolateDataSlots
Definition: v8-internal.h:177
const int kApiSystemPointerSize
Definition: v8-internal.h:32

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

◆ kIsolateFastCCallCallerPcOffset

const int kIsolateFastCCallCallerPcOffset
static
Initial value:

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

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

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

Referenced by Internals::GetRoot().

◆ kIsolateStackGuardOffset

const int kIsolateStackGuardOffset
static
Initial value:

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

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

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

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

◆ kNodeStateMask

const int kNodeStateMask = 0x7
static

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

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

◆ kNullOddballKind

const int kNullOddballKind = 3
static

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

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

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

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

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

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

Referenced by Isolate::GetNumberOfDataSlots().

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

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

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x43
static

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

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

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

Referenced by String::GetExternalStringResourceBase().

◆ kStringResourceOffset

const int kStringResourceOffset
static
Initial value:
=
const int kApiInt32Size
Definition: v8-internal.h:34
const int kApiTaggedSize
Definition: v8-internal.h:106

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

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

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

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

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

◆ kThrowOnError

const int kThrowOnError = 0
static

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

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

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

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

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

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

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

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

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


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