v8  3.28.71 (node 0.12.18)
V8 is Google's open source JavaScript engine
Internals Class Reference

#include <v8.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::Object *value)
 
static V8_INLINE int SmiValue (const internal::Object *value)
 
static V8_INLINE internal::Object * IntToSmi (int value)
 
static V8_INLINE bool IsValidSmi (intptr_t value)
 
static V8_INLINE int GetInstanceType (const internal::Object *obj)
 
static V8_INLINE int GetOddballKind (const internal::Object *obj)
 
static V8_INLINE bool IsExternalTwoByteString (int instance_type)
 
static V8_INLINE uint8_t GetNodeFlag (internal::Object **obj, int shift)
 
static V8_INLINE void UpdateNodeFlag (internal::Object **obj, bool value, int shift)
 
static V8_INLINE uint8_t GetNodeState (internal::Object **obj)
 
static V8_INLINE void UpdateNodeState (internal::Object **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::Object ** GetRoot (v8::Isolate *isolate, int index)
 
template<typename T >
static V8_INLINEReadField (const internal::Object *ptr, int offset)
 
template<typename T >
static V8_INLINEReadEmbedderData (const v8::Context *context, int index)
 

Static Public Attributes

static const int kHeapObjectMapOffset = 0
 
static const int kMapInstanceTypeAndBitFieldOffset
 
static const int kStringResourceOffset = 3 * kApiPointerSize
 
static const int kOddballKindOffset = 3 * kApiPointerSize
 
static const int kForeignAddressOffset = kApiPointerSize
 
static const int kJSObjectHeaderSize = 3 * kApiPointerSize
 
static const int kFixedArrayHeaderSize = 2 * kApiPointerSize
 
static const int kContextHeaderSize = 2 * kApiPointerSize
 
static const int kContextEmbedderDataIndex = 95
 
static const int kFullStringRepresentationMask = 0x07
 
static const int kStringEncodingMask = 0x4
 
static const int kExternalTwoByteRepresentationTag = 0x02
 
static const int kExternalAsciiRepresentationTag = 0x06
 
static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize
 
static const int kAmountOfExternalAllocatedMemoryOffset
 
static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset
 
static const int kIsolateRootsOffset
 
static const int kUndefinedValueRootIndex = 5
 
static const int kNullValueRootIndex = 7
 
static const int kTrueValueRootIndex = 8
 
static const int kFalseValueRootIndex = 9
 
static const int kEmptyStringRootIndex = 164
 
static const int kExternalAllocationLimit = 192 * 1024 * 1024
 
static const int kNodeClassIdOffset = 1 * kApiPointerSize
 
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3
 
static const int kNodeStateMask = 0xf
 
static const int kNodeStateIsWeakValue = 2
 
static const int kNodeStateIsPendingValue = 3
 
static const int kNodeStateIsNearDeathValue = 4
 
static const int kNodeIsIndependentShift = 4
 
static const int kNodeIsPartiallyDependentShift = 5
 
static const int kJSObjectType = 0xbc
 
static const int kFirstNonstringType = 0x80
 
static const int kOddballType = 0x83
 
static const int kForeignType = 0x88
 
static const int kUndefinedOddballKind = 5
 
static const int kNullOddballKind = 3
 
static const uint32_t kNumIsolateDataSlots = 4
 

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

Member Function Documentation

◆ CheckInitialized()

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

Definition at line 5640 of file v8.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

Definition at line 5712 of file v8.h.

References v8::internal::kApiPointerSize, and Internals::kIsolateEmbedderDataOffset.

Referenced by Isolate::GetData().

◆ GetInstanceType()

◆ GetNodeFlag()

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

Definition at line 5681 of file v8.h.

References Internals::kNodeFlagsOffset.

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

◆ GetNodeState()

static V8_INLINE uint8_t GetNodeState ( internal::Object **  obj)
inlinestatic

◆ GetOddballKind()

static V8_INLINE int GetOddballKind ( const internal::Object *  obj)
inlinestatic

◆ GetRoot()

static V8_INLINE internal::Object** GetRoot ( v8::Isolate isolate,
int  index 
)
inlinestatic

◆ HasHeapObjectTag()

static V8_INLINE bool HasHeapObjectTag ( const internal::Object *  value)
inlinestatic

Definition at line 5646 of file v8.h.

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

◆ IntToSmi()

static V8_INLINE internal::Object* IntToSmi ( int  value)
inlinestatic

Definition at line 5655 of file v8.h.

References SmiTagging< 8 >::IntToSmi().

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

◆ IsExternalTwoByteString()

static V8_INLINE bool IsExternalTwoByteString ( int  instance_type)
inlinestatic

◆ IsValidSmi()

static V8_INLINE bool IsValidSmi ( intptr_t  value)
inlinestatic

Definition at line 5659 of file v8.h.

References SmiTagging< 8 >::IsValidSmi().

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

◆ ReadEmbedderData()

◆ ReadField()

◆ SetEmbedderData()

static V8_INLINE void SetEmbedderData ( v8::Isolate isolate,
uint32_t  slot,
void *  data 
)
inlinestatic

Definition at line 5704 of file v8.h.

References v8::internal::kApiPointerSize, and Internals::kIsolateEmbedderDataOffset.

Referenced by Isolate::SetData().

◆ SmiValue()

static V8_INLINE int SmiValue ( const internal::Object *  value)
inlinestatic

Definition at line 5651 of file v8.h.

References SmiTagging< 8 >::SmiToInt().

Referenced by Internals::GetOddballKind().

◆ UpdateNodeFlag()

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

◆ UpdateNodeState()

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

Definition at line 5698 of file v8.h.

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

Field Documentation

◆ kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset

const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset
static
Initial value:
=
static const int kAmountOfExternalAllocatedMemoryOffset
Definition: v8.h:5603
const int kApiInt64Size
Definition: v8.h:5503

Definition at line 5605 of file v8.h.

Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory().

◆ kAmountOfExternalAllocatedMemoryOffset

const int kAmountOfExternalAllocatedMemoryOffset
static
Initial value:
=
const int kApiPointerSize
Definition: v8.h:5501

Definition at line 5603 of file v8.h.

Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory().

◆ kContextEmbedderDataIndex

const int kContextEmbedderDataIndex = 95
static

Definition at line 5596 of file v8.h.

Referenced by Internals::ReadEmbedderData().

◆ kContextHeaderSize

const int kContextHeaderSize = 2 * kApiPointerSize
static

Definition at line 5595 of file v8.h.

Referenced by Internals::ReadEmbedderData().

◆ kEmptyStringRootIndex

const int kEmptyStringRootIndex = 164
static

Definition at line 5614 of file v8.h.

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

◆ kExternalAllocationLimit

const int kExternalAllocationLimit = 192 * 1024 * 1024
static

Definition at line 5618 of file v8.h.

Referenced by Isolate::AdjustAmountOfExternalAllocatedMemory().

◆ kExternalAsciiRepresentationTag

const int kExternalAsciiRepresentationTag = 0x06
static

Definition at line 5600 of file v8.h.

Referenced by String::GetExternalStringResourceBase().

◆ kExternalTwoByteRepresentationTag

const int kExternalTwoByteRepresentationTag = 0x02
static

◆ kFalseValueRootIndex

const int kFalseValueRootIndex = 9
static

Definition at line 5613 of file v8.h.

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

◆ kFirstNonstringType

const int kFirstNonstringType = 0x80
static

Definition at line 5630 of file v8.h.

◆ kFixedArrayHeaderSize

const int kFixedArrayHeaderSize = 2 * kApiPointerSize
static

Definition at line 5594 of file v8.h.

Referenced by Internals::ReadEmbedderData().

◆ kForeignAddressOffset

const int kForeignAddressOffset = kApiPointerSize
static

Definition at line 5592 of file v8.h.

◆ kForeignType

const int kForeignType = 0x88
static

Definition at line 5632 of file v8.h.

◆ kFullStringRepresentationMask

const int kFullStringRepresentationMask = 0x07
static

◆ kHeapObjectMapOffset

const int kHeapObjectMapOffset = 0
static

Definition at line 5586 of file v8.h.

Referenced by Internals::GetInstanceType().

◆ kIsolateEmbedderDataOffset

const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize
static

Definition at line 5602 of file v8.h.

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

◆ kIsolateRootsOffset

const int kIsolateRootsOffset
static
Initial value:

Definition at line 5607 of file v8.h.

Referenced by Internals::GetRoot().

◆ kJSObjectHeaderSize

const int kJSObjectHeaderSize = 3 * kApiPointerSize
static

Definition at line 5593 of file v8.h.

Referenced by Object::GetAlignedPointerFromInternalField(), and Object::GetInternalField().

◆ kJSObjectType

const int kJSObjectType = 0xbc
static

Definition at line 5629 of file v8.h.

Referenced by Object::GetAlignedPointerFromInternalField(), and Object::GetInternalField().

◆ kMapInstanceTypeAndBitFieldOffset

const int kMapInstanceTypeAndBitFieldOffset
static
Initial value:
=
const int kApiIntSize
Definition: v8.h:5502

Definition at line 5587 of file v8.h.

Referenced by Internals::GetInstanceType().

◆ kNodeClassIdOffset

const int kNodeClassIdOffset = 1 * kApiPointerSize
static

◆ kNodeFlagsOffset

const int kNodeFlagsOffset = 1 * kApiPointerSize + 3
static

◆ kNodeIsIndependentShift

const int kNodeIsIndependentShift = 4
static

◆ kNodeIsPartiallyDependentShift

const int kNodeIsPartiallyDependentShift = 5
static

Definition at line 5627 of file v8.h.

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

◆ kNodeStateIsNearDeathValue

const int kNodeStateIsNearDeathValue = 4
static

Definition at line 5625 of file v8.h.

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

◆ kNodeStateIsPendingValue

const int kNodeStateIsPendingValue = 3
static

Definition at line 5624 of file v8.h.

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

◆ kNodeStateIsWeakValue

const int kNodeStateIsWeakValue = 2
static

Definition at line 5623 of file v8.h.

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

◆ kNodeStateMask

const int kNodeStateMask = 0xf
static

Definition at line 5622 of file v8.h.

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

◆ kNullOddballKind

const int kNullOddballKind = 3
static

Definition at line 5635 of file v8.h.

◆ kNullValueRootIndex

const int kNullValueRootIndex = 7
static

Definition at line 5611 of file v8.h.

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

◆ kNumIsolateDataSlots

const uint32_t kNumIsolateDataSlots = 4
static

Definition at line 5637 of file v8.h.

Referenced by Isolate::GetNumberOfDataSlots().

◆ kOddballKindOffset

const int kOddballKindOffset = 3 * kApiPointerSize
static

Definition at line 5591 of file v8.h.

Referenced by Internals::GetOddballKind().

◆ kOddballType

const int kOddballType = 0x83
static

Definition at line 5631 of file v8.h.

◆ kStringEncodingMask

const int kStringEncodingMask = 0x4
static

Definition at line 5598 of file v8.h.

Referenced by String::GetExternalStringResourceBase().

◆ kStringResourceOffset

const int kStringResourceOffset = 3 * kApiPointerSize
static

◆ kTrueValueRootIndex

const int kTrueValueRootIndex = 8
static

Definition at line 5612 of file v8.h.

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

◆ kUndefinedOddballKind

const int kUndefinedOddballKind = 5
static

Definition at line 5634 of file v8.h.

◆ kUndefinedValueRootIndex

const int kUndefinedValueRootIndex = 5
static

Definition at line 5610 of file v8.h.

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


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