Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
v8-internal.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <atomic>
#include <iterator>
#include <limits>
#include <memory>
#include <optional>
#include <type_traits>
#include "v8config.h"
Include dependency graph for v8-internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  v8::internal::SmiTagging< 4 >
 
struct  v8::internal::SmiTagging< 8 >
 
class  v8::internal::Internals
 
struct  v8::internal::CastCheck< PerformCheck >
 
class  v8::internal::BackingStoreBase
 
class  v8::internal::StrongRootAllocatorBase
 
class  v8::internal::StrongRootAllocator< T >
 
struct  v8::internal::MaybeDefineIteratorConcept< Iterator, typename >
 
struct  v8::internal::MaybeDefineIteratorConcept< Iterator, std::enable_if_t< kHaveIteratorConcept< Iterator > > >
 
struct  v8::internal::MaybeDefineIteratorConcept< Iterator, std::enable_if_t< kHaveIteratorCategory< Iterator > &&!kHaveIteratorConcept< Iterator > > >
 
class  v8::internal::WrappedIterator< Iterator, ElementType >
 
class  v8::internal::ValueHelper
 
class  v8::internal::HandleHelper
 

Namespaces

namespace  v8
 
namespace  v8::internal
 

Macros

#define V8_HAVE_SPACESHIP_OPERATOR   0
 
#define TAG(i)
 
#define SHARED_EXTERNAL_POINTER_TAGS(V)
 
#define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V)
 
#define ALL_EXTERNAL_POINTER_TAGS(V)
 
#define EXTERNAL_POINTER_TAG_ENUM(Name, Tag)   Name = Tag,
 
#define MAKE_TAG(HasMarkBit, TypeTag)
 
#define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...)    static_assert(IsSharedExternalPointerType(Tag));
 
#define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...)    static_assert(!IsSharedExternalPointerType(Tag));
 

Typedefs

typedef uintptr_t v8::internal::Address
 
using v8::internal::PlatformSmiTagging = SmiTagging< kApiTaggedSize >
 
using v8::internal::SandboxedPointer_t = Address
 
using v8::internal::ExternalPointerHandle = uint32_t
 
using v8::internal::ExternalPointer_t = Address
 
using v8::internal::CppHeapPointerHandle = uint32_t
 
using v8::internal::CppHeapPointer_t = Address
 
using v8::internal::IndirectPointerHandle = uint32_t
 
using v8::internal::TrustedPointerHandle = IndirectPointerHandle
 
using v8::internal::CodePointerHandle = IndirectPointerHandle
 

Enumerations

enum  v8::internal::ExternalPointerTag : uint64_t {
  v8::internal::kExternalPointerNullTag = ((static_cast<uint64_t>( 0b00000000 ) << kExternalPointerTagShift) | ( 1 ? kExternalPointerMarkBit : 0)) , v8::internal::kAnyExternalPointerTag = ((static_cast<uint64_t>( 0b11111111 ) << kExternalPointerTagShift) | ( 1 ? kExternalPointerMarkBit : 0)) , v8::internal::kAnyForeignTag = kAnyExternalPointerTag , v8::internal::kExternalPointerFreeEntryTag = ((static_cast<uint64_t>( 0b11111111 ) << kExternalPointerTagShift) | ( 0 ? kExternalPointerMarkBit : 0)) ,
  v8::internal::kExternalPointerEvacuationEntryTag = ((static_cast<uint64_t>( 0b11111110 ) << kExternalPointerTagShift) | ( 1 ? kExternalPointerMarkBit : 0)) , v8::internal::kExternalPointerZappedEntryTag = ((static_cast<uint64_t>( 0b11111101 ) << kExternalPointerTagShift) | ( 0 ? kExternalPointerMarkBit : 0)) , v8::internal::kFirstSharedTag = ((kAllTagsForAndBasedTypeChecking[ 0 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWaiterQueueNodeTag = ((kAllTagsForAndBasedTypeChecking[ 0 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kExternalStringResourceTag = ((kAllTagsForAndBasedTypeChecking[ 1 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kExternalStringResourceDataTag = ((kAllTagsForAndBasedTypeChecking[ 2 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kLastSharedTag = ((kAllTagsForAndBasedTypeChecking[ 2 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kNativeContextMicrotaskQueueTag = ((kAllTagsForAndBasedTypeChecking[ 5 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kEmbedderDataSlotPayloadTag = ((kAllTagsForAndBasedTypeChecking[ 6 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kExternalObjectValueTag = ((kAllTagsForAndBasedTypeChecking[ 7 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kFunctionTemplateInfoCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 8 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kAccessorInfoGetterTag = ((kAllTagsForAndBasedTypeChecking[ 9 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kAccessorInfoSetterTag = ((kAllTagsForAndBasedTypeChecking[ 10 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmInternalFunctionCallTargetTag = ((kAllTagsForAndBasedTypeChecking[ 11 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmTypeInfoNativeTypeTag = ((kAllTagsForAndBasedTypeChecking[ 12 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmExportedFunctionDataSignatureTag = ((kAllTagsForAndBasedTypeChecking[ 13 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kWasmContinuationJmpbufTag = ((kAllTagsForAndBasedTypeChecking[ 14 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmStackMemoryTag = ((kAllTagsForAndBasedTypeChecking[ 15 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmIndirectFunctionTargetTag = ((kAllTagsForAndBasedTypeChecking[ 16 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kGenericForeignTag = ((kAllTagsForAndBasedTypeChecking[ 20 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kApiNamedPropertyQueryCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 21 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiNamedPropertyGetterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 22 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiNamedPropertySetterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 23 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiNamedPropertyDescriptorCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 24 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kApiNamedPropertyDefinerCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 25 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiNamedPropertyDeleterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 26 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiIndexedPropertyQueryCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 27 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiIndexedPropertyGetterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 28 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kApiIndexedPropertySetterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 29 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiIndexedPropertyDescriptorCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 30 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiIndexedPropertyDefinerCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 31 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiIndexedPropertyDeleterCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 32 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kApiIndexedPropertyEnumeratorCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 33 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiAccessCheckCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 34 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kApiAbortScriptExecutionCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 35 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kSyntheticModuleTag = ((kAllTagsForAndBasedTypeChecking[ 36 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kMicrotaskCallbackTag = ((kAllTagsForAndBasedTypeChecking[ 37 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kMicrotaskCallbackDataTag = ((kAllTagsForAndBasedTypeChecking[ 38 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kCFunctionTag = ((kAllTagsForAndBasedTypeChecking[ 39 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kCFunctionInfoTag = ((kAllTagsForAndBasedTypeChecking[ 40 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kMessageListenerTag = ((kAllTagsForAndBasedTypeChecking[ 41 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWaiterQueueForeignTag = ((kAllTagsForAndBasedTypeChecking[ 42 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kFirstManagedResourceTag = ((kAllTagsForAndBasedTypeChecking[ 50 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kGenericManagedTag = ((kAllTagsForAndBasedTypeChecking[ 50 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kWasmWasmStreamingTag = ((kAllTagsForAndBasedTypeChecking[ 51 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmFuncDataTag = ((kAllTagsForAndBasedTypeChecking[ 52 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmManagedDataTag = ((kAllTagsForAndBasedTypeChecking[ 53 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kWasmNativeModuleTag = ((kAllTagsForAndBasedTypeChecking[ 54 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kIcuBreakIteratorTag = ((kAllTagsForAndBasedTypeChecking[ 55 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuUnicodeStringTag = ((kAllTagsForAndBasedTypeChecking[ 56 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuListFormatterTag = ((kAllTagsForAndBasedTypeChecking[ 57 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuLocaleTag = ((kAllTagsForAndBasedTypeChecking[ 58 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kIcuSimpleDateFormatTag = ((kAllTagsForAndBasedTypeChecking[ 59 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuDateIntervalFormatTag = ((kAllTagsForAndBasedTypeChecking[ 60 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuRelativeDateTimeFormatterTag = ((kAllTagsForAndBasedTypeChecking[ 61 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuLocalizedNumberFormatterTag = ((kAllTagsForAndBasedTypeChecking[ 62 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kIcuPluralRulesTag = ((kAllTagsForAndBasedTypeChecking[ 63 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kIcuCollatorTag = ((kAllTagsForAndBasedTypeChecking[ 64 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kDisplayNamesInternalTag = ((kAllTagsForAndBasedTypeChecking[ 65 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) , v8::internal::kArrayBufferExtensionTag = ((kAllTagsForAndBasedTypeChecking[ 66 ] << kExternalPointerTagShift) | kExternalPointerMarkBit) ,
  v8::internal::kLastManagedResourceTag = ((kAllTagsForAndBasedTypeChecking[ 66 ] << kExternalPointerTagShift) | kExternalPointerMarkBit)
}
 

Functions

constexpr bool v8::internal::PointerCompressionIsEnabled ()
 
constexpr bool v8::internal::SmiValuesAre31Bits ()
 
constexpr bool v8::internal::SmiValuesAre32Bits ()
 
constexpr bool v8::internal::Is64 ()
 
constexpr bool v8::internal::SandboxIsEnabled ()
 
internal::Isolate * v8::internal::IsolateFromNeverReadOnlySpaceObject (Address obj)
 
bool v8::internal::ShouldThrowOnError (internal::Isolate *isolate)
 
template<class T >
void v8::internal::PerformCastCheck (T *data)
 
void v8::internal::VerifyHandleIsNonEmpty (bool is_empty)
 
void v8::internal::PrintFunctionCallbackInfo (void *function_callback_info)
 
void v8::internal::PrintPropertyCallbackInfo (void *property_callback_info)
 

Variables

constexpr int v8::internal::KB = 1024
 
constexpr int v8::internal::MB = KB * 1024
 
constexpr int v8::internal::GB = MB * 1024
 
const int v8::internal::kApiSystemPointerSize = sizeof(void*)
 
const int v8::internal::kApiDoubleSize = sizeof(double)
 
const int v8::internal::kApiInt32Size = sizeof(int32_t)
 
const int v8::internal::kApiInt64Size = sizeof(int64_t)
 
const int v8::internal::kApiSizetSize = sizeof(size_t)
 
const int v8::internal::kHeapObjectTag = 1
 
const int v8::internal::kWeakHeapObjectTag = 3
 
const int v8::internal::kHeapObjectTagSize = 2
 
const intptr_t v8::internal::kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1
 
const intptr_t v8::internal::kHeapObjectReferenceTagMask = 1 << (kHeapObjectTagSize - 1)
 
const int v8::internal::kForwardingTag = 0
 
const int v8::internal::kForwardingTagSize = 2
 
const intptr_t v8::internal::kForwardingTagMask = (1 << kForwardingTagSize) - 1
 
const int v8::internal::kSmiTag = 0
 
const int v8::internal::kSmiTagSize = 1
 
const intptr_t v8::internal::kSmiTagMask = (1 << kSmiTagSize) - 1
 
constexpr intptr_t v8::internal::kIntptrAllBitsSet = intptr_t{-1}
 
constexpr uintptr_t v8::internal::kUintptrAllBitsSet
 
const int v8::internal::kApiTaggedSize = kApiSystemPointerSize
 
const int v8::internal::kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize
 
const int v8::internal::kSmiValueSize = PlatformSmiTagging::kSmiValueSize
 
const int v8::internal::kSmiMinValue = static_cast<int>(PlatformSmiTagging::kSmiMinValue)
 
const int v8::internal::kSmiMaxValue = static_cast<int>(PlatformSmiTagging::kSmiMaxValue)
 
constexpr size_t v8::internal::kMaxExternalPointers = 0
 
constexpr ExternalPointer_t v8::internal::kNullExternalPointer = 0
 
constexpr ExternalPointerHandle v8::internal::kNullExternalPointerHandle = 0
 
constexpr CppHeapPointer_t v8::internal::kNullCppHeapPointer = 0
 
constexpr CppHeapPointerHandle v8::internal::kNullCppHeapPointerHandle = 0
 
constexpr uint64_t v8::internal::kCppHeapPointerMarkBit = 1ULL
 
constexpr uint64_t v8::internal::kCppHeapPointerTagShift = 1
 
constexpr uint64_t v8::internal::kCppHeapPointerPayloadShift = 16
 
constexpr size_t v8::internal::kMaxCppHeapPointers = 0
 
constexpr uint64_t v8::internal::kExternalPointerMarkBit = 1ULL << 62
 
constexpr uint64_t v8::internal::kExternalPointerTagMask = 0x40ff000000000000
 
constexpr uint64_t v8::internal::kExternalPointerTagMaskWithoutMarkBit = 0xff000000000000
 
constexpr uint64_t v8::internal::kExternalPointerTagShift = 48
 
constexpr uint64_t v8::internal::kAllTagsForAndBasedTypeChecking []
 
constexpr IndirectPointerHandle v8::internal::kNullIndirectPointerHandle = 0
 
constexpr size_t v8::internal::kTrustedPointerTableReservationSize = 64 * MB
 
constexpr uint32_t v8::internal::kTrustedPointerHandleShift = 9
 
constexpr TrustedPointerHandle v8::internal::kNullTrustedPointerHandle
 
constexpr int v8::internal::kTrustedPointerTableEntrySize = 8
 
constexpr int v8::internal::kTrustedPointerTableEntrySizeLog2 = 3
 
constexpr size_t v8::internal::kMaxTrustedPointers
 
constexpr size_t v8::internal::kCodePointerTableReservationSize = 128 * MB
 
constexpr uint32_t v8::internal::kCodePointerHandleShift = 9
 
constexpr CodePointerHandle v8::internal::kNullCodePointerHandle = kNullIndirectPointerHandle
 
constexpr uint32_t v8::internal::kCodePointerHandleMarker = 0x1
 
constexpr int v8::internal::kCodePointerTableEntrySize = 16
 
constexpr int v8::internal::kCodePointerTableEntrySizeLog2 = 4
 
constexpr size_t v8::internal::kMaxCodePointers
 
constexpr int v8::internal::kCodePointerTableEntryEntrypointOffset = 0
 
constexpr int v8::internal::kCodePointerTableEntryCodeObjectOffset = 8
 
constexpr bool v8::internal::kRuntimeGeneratedCodeObjectsLiveInTrustedSpace = true
 
constexpr bool v8::internal::kBuiltinCodeObjectsLiveInTrustedSpace = false
 
constexpr bool v8::internal::kAllCodeObjectsLiveInTrustedSpace
 
constexpr int v8::internal::kGarbageCollectionReasonMaxValue = 27
 
template<typename Iterator , typename = void>
constexpr bool v8::internal::kHaveIteratorConcept = false
 
template<typename Iterator , typename = void>
constexpr bool v8::internal::kHaveIteratorCategory = false
 

Macro Definition Documentation

◆ ALL_EXTERNAL_POINTER_TAGS

#define ALL_EXTERNAL_POINTER_TAGS (   V)
Value:
PER_ISOLATE_EXTERNAL_POINTER_TAGS(V)
#define SHARED_EXTERNAL_POINTER_TAGS(V)
Definition: v8-internal.h:515
#define V(Name)

◆ CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS

#define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS (   Tag,
  ... 
)     static_assert(!IsSharedExternalPointerType(Tag));

◆ CHECK_SHARED_EXTERNAL_POINTER_TAGS

#define CHECK_SHARED_EXTERNAL_POINTER_TAGS (   Tag,
  ... 
)     static_assert(IsSharedExternalPointerType(Tag));

◆ EXTERNAL_POINTER_TAG_ENUM

#define EXTERNAL_POINTER_TAG_ENUM (   Name,
  Tag 
)    Name = Tag,

◆ MAKE_TAG

#define MAKE_TAG (   HasMarkBit,
  TypeTag 
)
Value:
((static_cast<uint64_t>(TypeTag) << kExternalPointerTagShift) | \
(HasMarkBit ? kExternalPointerMarkBit : 0))

◆ PER_ISOLATE_EXTERNAL_POINTER_TAGS

#define PER_ISOLATE_EXTERNAL_POINTER_TAGS (   V)

◆ SHARED_EXTERNAL_POINTER_TAGS

#define SHARED_EXTERNAL_POINTER_TAGS (   V)
Value:
V(kFirstSharedTag, TAG(0)) \
V(kWaiterQueueNodeTag, TAG(0)) \
V(kExternalStringResourceTag, TAG(1)) \
V(kExternalStringResourceDataTag, TAG(2)) \
V(kLastSharedTag, TAG(2))
#define TAG(i)
Definition: v8-internal.h:501

◆ TAG

#define TAG (   i)
Value:
((kAllTagsForAndBasedTypeChecking[i] << kExternalPointerTagShift) | \
kExternalPointerMarkBit)

◆ V8_HAVE_SPACESHIP_OPERATOR

#define V8_HAVE_SPACESHIP_OPERATOR   0