v8 11.3.244 (node 20.3.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
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 (Address value)
 
static V8_INLINE int SmiValue (Address value)
 
static V8_INLINE constexpr Address IntToSmi (int value)
 
static V8_INLINE constexpr bool IsValidSmi (intptr_t value)
 
static V8_INLINE int GetInstanceType (Address obj)
 
static V8_INLINE int GetOddballKind (Address obj)
 
static V8_INLINE bool IsExternalTwoByteString (int instance_type)
 
static V8_INLINE constexpr bool CanHaveInternalField (int instance_type)
 
static V8_INLINE uint8_t GetNodeFlag (Address *obj, int shift)
 
static V8_INLINE void UpdateNodeFlag (Address *obj, bool value, int shift)
 
static V8_INLINE uint8_t GetNodeState (Address *obj)
 
static V8_INLINE void UpdateNodeState (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 AddressGetRootSlot (v8::Isolate *isolate, int index)
 
static V8_INLINE Address GetRoot (v8::Isolate *isolate, int index)
 
template<typename T >
static V8_INLINEReadRawField (Address heap_object_ptr, int offset)
 
static V8_INLINE Address ReadTaggedPointerField (Address heap_object_ptr, int offset)
 
static V8_INLINE Address ReadTaggedSignedField (Address heap_object_ptr, int offset)
 
static V8_INLINE v8::IsolateGetIsolateForSandbox (Address obj)
 
template<ExternalPointerTag tag>
static V8_INLINE Address ReadExternalPointerField (v8::Isolate *isolate, 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 kEmbedderDataSlotExternalPointerOffset = 0
 
static const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize
 
static const int kStringRepresentationAndEncodingMask = 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 kStackGuardSize = 7 * kApiSystemPointerSize
 
static const int kBuiltinTier0EntryTableSize = 7 * kApiSystemPointerSize
 
static const int kBuiltinTier0TableSize = 7 * kApiSystemPointerSize
 
static const int kLinearAllocationAreaSize = 3 * kApiSystemPointerSize
 
static const int kThreadLocalTopSize = 25 * kApiSystemPointerSize
 
static const int kExternalPointerTableBufferOffset = 0
 
static const int kExternalPointerTableSize = 4 * kApiSystemPointerSize
 
static const int kIsolateCageBaseOffset = 0
 
static const int kIsolateStackGuardOffset
 
static const int kVariousBooleanFlagsOffset
 
static const int kBuiltinTier0EntryTableOffset
 
static const int kBuiltinTier0TableOffset
 
static const int kNewAllocationInfoOffset
 
static const int kOldAllocationInfoOffset
 
static const int kIsolateFastCCallCallerFpOffset
 
static const int kIsolateFastCCallCallerPcOffset
 
static const int kIsolateFastApiCallTargetOffset
 
static const int kIsolateLongTaskStatsCounterOffset
 
static const int kIsolateThreadLocalTopOffset
 
static const int kIsolateEmbedderDataOffset
 
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 = 0x3
 
static const int kNodeStateIsWeakValue = 2
 
static const int kTracedNodeClassIdOffset = kApiSystemPointerSize
 
static const int kFirstNonstringType = 0x80
 
static const int kOddballType = 0x83
 
static const int kForeignType = 0xcc
 
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 487 of file v8-internal.h.

Member Function Documentation

◆ CanHaveInternalField()

static V8_INLINE constexpr bool CanHaveInternalField ( int  instance_type)
inlinestaticconstexpr

◆ CheckInitialized()

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

Definition at line 638 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 ( Address  obj)
inlinestatic

◆ GetIsolateForSandbox()

static V8_INLINE v8::Isolate * GetIsolateForSandbox ( Address  obj)
inlinestatic

◆ GetNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ GetNodeState()

static V8_INLINE uint8_t GetNodeState ( Address obj)
inlinestatic

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

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

◆ GetOddballKind()

static V8_INLINE int GetOddballKind ( Address  obj)
inlinestatic

◆ GetRoot()

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

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

References Internals::GetRootSlot(), and Internals::kIsolateCageBaseOffset.

◆ GetRootSlot()

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

◆ HasHeapObjectTag()

static V8_INLINE bool HasHeapObjectTag ( Address  value)
inlinestatic

◆ IncrementLongTasksStatsCounter()

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

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

References Internals::kIsolateLongTaskStatsCounterOffset.

Referenced by LongTaskStats::Reset().

◆ IntToSmi()

static V8_INLINE constexpr Address IntToSmi ( int  value)
inlinestaticconstexpr

Definition at line 652 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)
inlinestaticconstexpr

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

◆ ReadExternalPointerField()

template<ExternalPointerTag tag>
static V8_INLINE Address ReadExternalPointerField ( v8::Isolate isolate,
Address  heap_object_ptr,
int  offset 
)
inlinestatic

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

References v8::internal::kExternalPointerNullTag.

◆ ReadRawField()

template<typename T >
static V8_INLINE T ReadRawField ( Address  heap_object_ptr,
int  offset 
)
inlinestatic

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

References v8::internal::kApiTaggedSize, and v8::internal::kHeapObjectTag.

◆ ReadTaggedPointerField()

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

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

Referenced by Internals::GetInstanceType().

◆ ReadTaggedSignedField()

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

Definition at line 815 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 ( Address  value)
inlinestatic

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

Referenced by Internals::GetOddballKind().

◆ UpdateNodeFlag()

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

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

References Internals::kNodeFlagsOffset.

◆ UpdateNodeState()

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

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

References Internals::kNodeFlagsOffset.

Field Documentation

◆ kBuiltinTier0EntryTableOffset

const int kBuiltinTier0EntryTableOffset
static
Initial value:

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

◆ kBuiltinTier0EntryTableSize

const int kBuiltinTier0EntryTableSize = 7 * kApiSystemPointerSize
static

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

◆ kBuiltinTier0TableOffset

const int kBuiltinTier0TableOffset
static
Initial value:

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

◆ kBuiltinTier0TableSize

const int kBuiltinTier0TableSize = 7 * kApiSystemPointerSize
static

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

◆ kDontThrow

const int kDontThrow = 1
static

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

◆ kEmbedderDataArrayHeaderSize

const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kEmbedderDataSlotExternalPointerOffset

const int kEmbedderDataSlotExternalPointerOffset = 0
static

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

◆ kEmbedderDataSlotSize

const int kEmbedderDataSlotSize = kApiSystemPointerSize
static

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

◆ kEmptyStringRootIndex

const int kEmptyStringRootIndex = 9
static

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

◆ kExternalAllocationSoftLimit

constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024
staticconstexpr

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

◆ kExternalOneByteRepresentationTag

const int kExternalOneByteRepresentationTag = 0x0a
static

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

◆ kExternalPointerTableBufferOffset

const int kExternalPointerTableBufferOffset = 0
static

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

◆ kExternalPointerTableSize

const int kExternalPointerTableSize = 4 * kApiSystemPointerSize
static

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

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

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

Referenced by Internals::IsExternalTwoByteString().

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 8
static

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

◆ kFirstJSApiObjectType

const int kFirstJSApiObjectType = 0x422
static

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

Referenced by Internals::CanHaveInternalField().

◆ kFirstNonstringType

const int kFirstNonstringType = 0x80
static

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

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiTaggedSize
static

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

◆ kForeignType

const int kForeignType = 0xcc
static

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

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

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

Referenced by Internals::GetInstanceType().

◆ kInferShouldThrowMode

const int kInferShouldThrowMode = 2
static

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

◆ kIsolateCageBaseOffset

const int kIsolateCageBaseOffset = 0
static

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

Referenced by Internals::GetRoot().

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset
static
Initial value:

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

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

◆ kIsolateFastApiCallTargetOffset

const int kIsolateFastApiCallTargetOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerFpOffset

const int kIsolateFastCCallCallerFpOffset
static
Initial value:

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

◆ kIsolateFastCCallCallerPcOffset

const int kIsolateFastCCallCallerPcOffset
static
Initial value:

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

◆ kIsolateLongTaskStatsCounterOffset

const int kIsolateLongTaskStatsCounterOffset
static
Initial value:

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

Referenced by Internals::IncrementLongTasksStatsCounter().

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

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

Referenced by Internals::GetRootSlot().

◆ kIsolateStackGuardOffset

const int kIsolateStackGuardOffset
static
Initial value:

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

◆ kIsolateThreadLocalTopOffset

const int kIsolateThreadLocalTopOffset
static
Initial value:

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

◆ kJSObjectHeaderSize

const int kJSObjectHeaderSize = 3 * kApiTaggedSize
static

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

◆ kJSObjectType

const int kJSObjectType = 0x421
static

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

Referenced by Internals::CanHaveInternalField().

◆ kJSSpecialApiObjectType

const int kJSSpecialApiObjectType = 0x410
static

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

Referenced by Internals::CanHaveInternalField().

◆ kLastJSApiObjectType

const int kLastJSApiObjectType = 0x80A
static

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

Referenced by Internals::CanHaveInternalField().

◆ kLinearAllocationAreaSize

const int kLinearAllocationAreaSize = 3 * kApiSystemPointerSize
static

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

◆ kMapInstanceTypeOffset

const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size
static

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

Referenced by Internals::GetInstanceType().

◆ kNativeContextEmbedderDataOffset

const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize
static

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

◆ kNewAllocationInfoOffset

const int kNewAllocationInfoOffset
static
Initial value:

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

◆ kNodeClassIdOffset

const int kNodeClassIdOffset = 1 * kApiSystemPointerSize
static

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

◆ kNodeFlagsOffset

const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3
static

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

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

◆ kNodeStateMask

const int kNodeStateMask = 0x3
static

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

Referenced by Internals::GetNodeState().

◆ kNullOddballKind

const int kNullOddballKind = 3
static

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

◆ kNullValueRootIndex

const int kNullValueRootIndex = 6
static

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

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

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

◆ kOddballKindOffset

const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize
static

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

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x83
static

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

◆ kOldAllocationInfoOffset

const int kOldAllocationInfoOffset
static
Initial value:

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

◆ kStackGuardSize

const int kStackGuardSize = 7 * kApiSystemPointerSize
static

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

◆ kStringEncodingMask

const int kStringEncodingMask = 0x8
static

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

◆ kStringRepresentationAndEncodingMask

const int kStringRepresentationAndEncodingMask = 0x0f
static

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

Referenced by Internals::IsExternalTwoByteString().

◆ kStringResourceOffset

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

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

◆ kTheHoleValueRootIndex

const int kTheHoleValueRootIndex = 5
static

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

◆ kThreadLocalTopSize

const int kThreadLocalTopSize = 25 * kApiSystemPointerSize
static

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

◆ kThrowOnError

const int kThrowOnError = 0
static

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

◆ kTracedNodeClassIdOffset

const int kTracedNodeClassIdOffset = kApiSystemPointerSize
static

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

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 7
static

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

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

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

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 4
static

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

◆ kVariousBooleanFlagsOffset

const int kVariousBooleanFlagsOffset
static
Initial value:

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


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