5#ifndef INCLUDE_V8_INTERNAL_H_
6#define INCLUDE_V8_INTERNAL_H_
32static constexpr Address kNullAddress = 0;
34constexpr int KB = 1024;
35constexpr int MB =
KB * 1024;
36constexpr int GB =
MB * 1024;
37#ifdef V8_TARGET_ARCH_X64
38constexpr size_t TB =
size_t{
GB} * 1024;
69template <
size_t tagged_ptr_size>
88 return static_cast<int32_t
>(
static_cast<uint32_t
>(value)) >> shift_bits;
94 return (
static_cast<uintptr_t
>(value) -
113 return static_cast<int>(
static_cast<intptr_t
>(value) >> shift_bits);
117 return (value ==
static_cast<int32_t
>(value));
121#ifdef V8_COMPRESS_POINTERS
124constexpr size_t kPtrComprCageReservationSize =
size_t{1} << 32;
125constexpr size_t kPtrComprCageBaseAlignment =
size_t{1} << 32;
129 "Pointer compression can be enabled only for 64-bit architectures");
139#ifdef V8_31BIT_SMIS_ON_64BIT_ARCH
149const int kSmiMinValue =
static_cast<int>(PlatformSmiTagging::kSmiMinValue);
150const int kSmiMaxValue =
static_cast<int>(PlatformSmiTagging::kSmiMaxValue);
164#ifdef V8_ENABLE_SANDBOX
175#ifdef V8_ENABLE_SANDBOX
178#if defined(V8_TARGET_OS_ANDROID)
182constexpr size_t kSandboxSizeLog2 = 37;
183#elif defined(V8_TARGET_ARCH_LOONG64)
186constexpr size_t kSandboxSizeLog2 = 38;
189constexpr size_t kSandboxSizeLog2 = 40;
191constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2;
198constexpr size_t kSandboxAlignment = kPtrComprCageBaseAlignment;
204constexpr uint64_t kSandboxedPointerShift = 64 - kSandboxSizeLog2;
209constexpr size_t kSandboxGuardRegionSize = 32ULL *
GB;
211static_assert((kSandboxGuardRegionSize % kSandboxAlignment) == 0,
212 "The size of the guard regions around the sandbox must be a "
213 "multiple of its required alignment.");
225constexpr size_t kSandboxMinimumReservationSize = 8ULL *
GB;
227static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize,
228 "The minimum reservation size for a sandbox must be larger than "
229 "the pointer compression cage contained within it.");
235constexpr size_t kMaxSafeBufferSizeForSandbox = 32ULL *
GB - 1;
236static_assert(kMaxSafeBufferSizeForSandbox <= kSandboxGuardRegionSize,
237 "The maximum allowed buffer size must not be larger than the "
238 "sandbox's guard regions");
240constexpr size_t kBoundedSizeShift = 29;
241static_assert(1ULL << (64 - kBoundedSizeShift) ==
242 kMaxSafeBufferSizeForSandbox + 1,
243 "The maximum size of a BoundedSize must be synchronized with the "
244 "kMaxSafeBufferSizeForSandbox");
248#ifdef V8_COMPRESS_POINTERS
250#ifdef V8_TARGET_OS_ANDROID
256constexpr size_t kExternalPointerTableReservationSize = 512 *
MB;
261constexpr uint32_t kExternalPointerIndexShift = 6;
263constexpr size_t kExternalPointerTableReservationSize = 1024 *
MB;
264constexpr uint32_t kExternalPointerIndexShift = 5;
268constexpr int kExternalPointerTableEntrySize = 8;
269constexpr int kExternalPointerTableEntrySizeLog2 = 3;
271 kExternalPointerTableReservationSize / kExternalPointerTableEntrySize;
273 "kExternalPointerTableReservationSize and "
274 "kExternalPointerIndexShift don't match");
295#ifdef V8_ENABLE_SANDBOX
384 0b00001111, 0b00010111, 0b00011011, 0b00011101, 0b00011110, 0b00100111,
385 0b00101011, 0b00101101, 0b00101110, 0b00110011, 0b00110101, 0b00110110,
386 0b00111001, 0b00111010, 0b00111100, 0b01000111, 0b01001011, 0b01001101,
387 0b01001110, 0b01010011, 0b01010101, 0b01010110, 0b01011001, 0b01011010,
388 0b01011100, 0b01100011, 0b01100101, 0b01100110, 0b01101001, 0b01101010,
389 0b01101100, 0b01110001, 0b01110010, 0b01110100, 0b01111000, 0b10000111,
390 0b10001011, 0b10001101, 0b10001110, 0b10010011, 0b10010101, 0b10010110,
391 0b10011001, 0b10011010, 0b10011100, 0b10100011, 0b10100101, 0b10100110,
392 0b10101001, 0b10101010, 0b10101100, 0b10110001, 0b10110010, 0b10110100,
393 0b10111000, 0b11000011, 0b11000101, 0b11000110, 0b11001001, 0b11001010,
394 0b11001100, 0b11010001, 0b11010010, 0b11010100, 0b11011000, 0b11100001,
395 0b11100010, 0b11100100, 0b11101000, 0b11110000};
398 ((kAllExternalPointerTypeTags[i] << kExternalPointerTagShift) | \
399 kExternalPointerMarkBit)
411#define SHARED_EXTERNAL_POINTER_TAGS(V) \
412 V(kFirstSharedTag, TAG(0)) \
413 V(kWaiterQueueNodeTag, TAG(0)) \
414 V(kExternalStringResourceTag, TAG(1)) \
415 V(kExternalStringResourceDataTag, TAG(2)) \
416 V(kLastSharedTag, TAG(2))
420#define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) \
421 V(kForeignForeignAddressTag, TAG(10)) \
422 V(kNativeContextMicrotaskQueueTag, TAG(11)) \
423 V(kEmbedderDataSlotPayloadTag, TAG(12)) \
427 V(kExternalObjectValueTag, TAG(13)) \
428 V(kFunctionTemplateInfoCallbackTag, TAG(14)) \
429 V(kAccessorInfoGetterTag, TAG(15)) \
430 V(kAccessorInfoSetterTag, TAG(16)) \
431 V(kWasmInternalFunctionCallTargetTag, TAG(17)) \
432 V(kWasmTypeInfoNativeTypeTag, TAG(18)) \
433 V(kWasmExportedFunctionDataSignatureTag, TAG(19)) \
434 V(kWasmContinuationJmpbufTag, TAG(20)) \
435 V(kWasmIndirectFunctionTargetTag, TAG(21)) \
436 V(kArrayBufferExtensionTag, TAG(22))
439#define ALL_EXTERNAL_POINTER_TAGS(V) \
440 SHARED_EXTERNAL_POINTER_TAGS(V) \
441 PER_ISOLATE_EXTERNAL_POINTER_TAGS(V)
443#define EXTERNAL_POINTER_TAG_ENUM(Name, Tag) Name = Tag,
444#define MAKE_TAG(HasMarkBit, TypeTag) \
445 ((static_cast<uint64_t>(TypeTag) << kExternalPointerTagShift) | \
446 (HasMarkBit ? kExternalPointerMarkBit : 0))
464#undef EXTERNAL_POINTER_TAG_ENUM
470V8_INLINE static constexpr bool IsSharedExternalPointerType(
472 return tag >= kFirstSharedTag && tag <= kLastSharedTag;
478V8_INLINE static constexpr bool IsMaybeReadOnlyExternalPointerType(
480 return tag == kAccessorInfoGetterTag || tag == kAccessorInfoSetterTag ||
481 tag == kFunctionTemplateInfoCallbackTag;
485#define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \
486 static_assert(IsSharedExternalPointerType(Tag));
487#define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \
488 static_assert(!IsSharedExternalPointerType(Tag));
493#undef CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS
494#undef CHECK_SHARED_EXTERNAL_POINTER_TAGS
496#undef SHARED_EXTERNAL_POINTER_TAGS
497#undef EXTERNAL_POINTER_TAGS
557 "kTrustedPointerTableReservationSize and "
558 "kTrustedPointerHandleShift don't match");
606 "kCodePointerTableReservationSize and kCodePointerHandleShift don't match");
636 return mapword ^ kMapWordXorMask;
653#ifdef V8_ENABLE_SANDBOX
717#ifdef V8_COMPRESS_POINTERS
718 static const int kIsolateExternalPointerTableOffset =
720 static const int kIsolateSharedExternalPointerTableAddressOffset =
722#ifdef V8_ENABLE_SANDBOX
723 static const int kIsolateTrustedCageBaseOffset =
725 static const int kIsolateTrustedPointerTableOffset =
747#if V8_STATIC_ROOTS_BOOL
750#define EXPORTED_STATIC_ROOTS_PTR_LIST(V) \
751 V(UndefinedValue, 0x69) \
754 V(FalseValue, 0xad) \
755 V(EmptyString, 0xa1) \
756 V(TheHoleValue, 0x719)
758 using Tagged_t = uint32_t;
759 struct StaticReadOnlyRoot {
760#define DEF_ROOT(name, value) static constexpr Tagged_t k##name = value;
761 EXPORTED_STATIC_ROOTS_PTR_LIST(DEF_ROOT)
764 static constexpr Tagged_t kFirstStringMap = 0xe5;
765 static constexpr Tagged_t kLastStringMap = 0x47d;
767#define PLUSONE(...) +1
768 static constexpr size_t kNumberOfExportedStaticRoots =
769 2 + EXPORTED_STATIC_ROOTS_PTR_LIST(PLUSONE);
814 static const uintptr_t kMapWordMetadataMask = 0xffffULL << 48;
816 static const uintptr_t kMapWordSignature = 0b10;
821 static const int kMapWordXorMask = 0b11;
826#ifdef V8_ENABLE_CHECKS
836 return PlatformSmiTagging::SmiToInt(value);
840 return internal::IntToSmi(value);
844 return PlatformSmiTagging::IsValidSmi(value);
847#if V8_STATIC_ROOTS_BOOL
849 return static_cast<Tagged_t
>(obj) == constant;
852 V8_INLINE static bool CheckInstanceMapRange(
Address obj, Tagged_t first_map,
856 map = UnpackMapWord(map);
858 return map >= first_map && map <= last_map;
865 map = UnpackMapWord(map);
874 map = UnpackMapWord(map);
895 (
static_cast<unsigned>(
static_cast<unsigned>(instance_type) -
902 return *addr &
static_cast<uint8_t
>(1U << shift);
907 uint8_t mask =
static_cast<uint8_t
>(1U << shift);
908 *addr =
static_cast<uint8_t
>((*addr & ~mask) | (value << shift));
918 *addr =
static_cast<uint8_t
>((*addr & ~kNodeStateMask) | value);
925 *
reinterpret_cast<void**
>(addr) = data;
932 return *
reinterpret_cast<void* const*
>(addr);
938 ++(*
reinterpret_cast<size_t*
>(addr));
944 return reinterpret_cast<Address*
>(addr);
948#if V8_STATIC_ROOTS_BOOL
952#define DECOMPRESS_ROOT(name, ...) \
953 case k##name##RootIndex: \
954 return base + StaticReadOnlyRoot::k##name;
955 EXPORTED_STATIC_ROOTS_PTR_LIST(DECOMPRESS_ROOT)
956#undef DECOMPRESS_ROOT
957#undef EXPORTED_STATIC_ROOTS_PTR_LIST
965#ifdef V8_ENABLE_SANDBOX
968 kIsolateExternalPointerTableOffset +
970 return *
reinterpret_cast<Address**
>(addr);
976 kIsolateSharedExternalPointerTableAddressOffset;
977 addr = *
reinterpret_cast<Address*
>(addr);
979 return *
reinterpret_cast<Address**
>(addr);
983 template <
typename T>
986#ifdef V8_COMPRESS_POINTERS
993 memcpy(&r,
reinterpret_cast<void*
>(addr),
sizeof(T));
997 return *
reinterpret_cast<const T*
>(addr);
1002#ifdef V8_COMPRESS_POINTERS
1003 uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
1004 Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
1005 return base +
static_cast<Address>(
static_cast<uintptr_t
>(value));
1007 return ReadRawField<Address>(heap_object_ptr, offset);
1013#ifdef V8_COMPRESS_POINTERS
1014 uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
1015 return static_cast<Address>(
static_cast<uintptr_t
>(value));
1017 return ReadRawField<Address>(heap_object_ptr, offset);
1022#ifdef V8_ENABLE_SANDBOX
1031 template <ExternalPo
interTag tag>
1035#ifdef V8_ENABLE_SANDBOX
1039 Address* table = IsSharedExternalPointerType(tag)
1040 ? GetSharedExternalPointerTableBase(isolate)
1041 : GetExternalPointerTableBase(isolate);
1043 ReadRawField<ExternalPointerHandle>(heap_object_ptr, offset);
1044 uint32_t index = handle >> kExternalPointerIndexShift;
1045 std::atomic<Address>* ptr =
1046 reinterpret_cast<std::atomic<Address>*
>(&table[index]);
1047 Address entry = std::atomic_load_explicit(ptr, std::memory_order_relaxed);
1048 return entry & ~tag;
1050 return ReadRawField<Address>(heap_object_ptr, offset);
1054#ifdef V8_COMPRESS_POINTERS
1056 return addr & -
static_cast<intptr_t
>(kPtrComprCageBaseAlignment);
1060 return static_cast<uint32_t
>(value);
1065 Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
1066 return base +
static_cast<Address>(
static_cast<uintptr_t
>(value));
1074template <
bool PerformCheck>
1093 !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
1108 Heap*
heap()
const {
return heap_; }
1111 return heap_ == other.heap_;
1114 return heap_ != other.heap_;
1134template <
typename T>
1136 private std::allocator<T> {
1143 template <
typename U>
1147 using std::allocator<T>::allocate;
1148 using std::allocator<T>::deallocate;
1155template <
typename Iterator,
typename ElementType =
void>
1159 !std::is_void_v<ElementType> ||
1160 (std::is_convertible_v<typename std::iterator_traits<Iterator>::pointer,
1162 std::is_convertible_v<typename std::iterator_traits<Iterator>::reference,
1166 typename std::iterator_traits<Iterator>::iterator_category;
1168 typename std::iterator_traits<Iterator>::difference_type;
1170 std::conditional_t<std::is_void_v<ElementType>,
1171 typename std::iterator_traits<Iterator>::value_type,
1174 std::conditional_t<std::is_void_v<ElementType>,
1175 typename std::iterator_traits<Iterator>::pointer,
1178 std::conditional_t<std::is_void_v<ElementType>,
1179 typename std::iterator_traits<Iterator>::reference,
1185 template <
typename OtherIterator,
typename OtherElementType,
1186 std::enable_if_t<std::is_convertible_v<OtherIterator, Iterator>,
1224 return *
this + (-n);
1234 constexpr Iterator
base() const noexcept {
return it_; }
1237 template <
typename OtherIterator,
typename OtherElementType>
1244template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1245 typename OtherElementType>
1249 return x.base() == y.base();
1252template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1253 typename OtherElementType>
1257 return x.base() < y.base();
1260template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1261 typename OtherElementType>
1268template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1269 typename OtherElementType>
1276template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1277 typename OtherElementType>
1284template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1285 typename OtherElementType>
1292template <
typename Iterator,
typename ElementType,
typename OtherIterator,
1293 typename OtherElementType>
1297 ->
decltype(x.base() - y.base()) {
1298 return x.base() - y.base();
1301template <
typename Iterator,
typename ElementType>
1314#ifdef V8_ENABLE_DIRECT_LOCAL
1315 static constexpr Address kTaggedNullAddress = 1;
1321 template <
typename T>
1329 template <
template <
typename T,
typename... Ms>
typename H,
typename T,
1332 return handle.template value<T>();
1335#ifdef V8_ENABLE_DIRECT_LOCAL
1337 template <
typename T>
1339 return reinterpret_cast<Address>(value);
1342 template <
typename T,
bool check_null = true,
typename S>
1344 if (check_null && slot ==
nullptr) {
1345 return reinterpret_cast<T*
>(kTaggedNullAddress);
1347 return *
reinterpret_cast<T**
>(slot);
1352 template <
typename T>
1354 return *
reinterpret_cast<const Address*
>(value);
1357 template <
typename T,
bool check_null = true,
typename S>
1359 return reinterpret_cast<T*
>(slot);
1380 template <
typename T1,
typename T2>
1382 if (lhs.IsEmpty())
return rhs.IsEmpty();
1383 if (rhs.IsEmpty())
return false;
1384 return lhs.ptr() == rhs.ptr();
static V8_INLINE bool EqualHandles(const T1 &lhs, const T2 &rhs)
static V8_EXPORT void VerifyOnMainThread()
static V8_EXPORT void VerifyOnStack(const void *ptr)
static V8_EXPORT bool IsOnStack(const void *ptr)
static const int kTrustedPointerTableBasePointerOffset
static const int kIsolateCageBaseOffset
static V8_INLINE Address LoadMap(Address obj)
static const int kTrueValueRootIndex
static const int kInferShouldThrowMode
static V8_INLINE void UpdateNodeFlag(Address *obj, bool value, int shift)
static const int kJSSpecialApiObjectType
static V8_INLINE void IncrementLongTasksStatsCounter(v8::Isolate *isolate)
static const int kExternalPointerTableSize
static const int kOddballKindOffset
static const int kOldAllocationInfoOffset
static const int kFirstEmbedderJSApiObjectType
static const int kFastCCallAlignmentPaddingSize
static const int kErrorMessageParamSize
static const int kFalseValueRootIndex
static const int kWasm64OOBOffsetOffset
static constexpr int kExternalAllocationSoftLimit
static const int kIsolateStackGuardOffset
static const int kNullValueRootIndex
static const int kIsolateFastCCallCallerPcOffset
static const int kDontThrow
static const int kEmptyStringRootIndex
static V8_INLINE uint8_t GetNodeState(Address *obj)
static const int kNativeContextEmbedderDataOffset
static V8_INLINE uint8_t GetNodeFlag(Address *obj, int shift)
static const int kStringRepresentationAndEncodingMask
static const int kIsolateThreadLocalTopOffset
static const int kIsolateLongTaskStatsCounterOffset
static const int kEmbedderDataArrayHeaderSize
static const int kExternalTwoByteRepresentationTag
static const int kNodeStateMask
static const int kUndefinedValueRootIndex
static V8_INLINE constexpr bool IsValidSmi(intptr_t value)
static V8_INLINE constexpr bool HasHeapObjectTag(Address value)
static const int kThrowOnError
static const int kEmbedderDataSlotExternalPointerOffset
static const int kBuiltinTier0TableSize
static const int kHandleScopeDataSize
static V8_INLINE Address ReadTaggedSignedField(Address heap_object_ptr, int offset)
static const int kWasm64OOBOffsetAlignmentPaddingSize
static V8_INLINE T ReadRawField(Address heap_object_ptr, int offset)
static V8_INLINE void CheckInitialized(v8::Isolate *isolate)
static const uint32_t kNumIsolateDataSlots
static const int kNumberOfBooleanFlags
static V8_INLINE Address * GetRootSlot(v8::Isolate *isolate, int index)
static const int kBuiltinTier0EntryTableSize
static const int kStackGuardSize
static const int kIsolateFastApiCallTargetOffset
static V8_INLINE constexpr bool CanHaveInternalField(int instance_type)
static V8_INLINE v8::Isolate * GetIsolateForSandbox(Address obj)
static const int kNodeFlagsOffset
static const int kContinuationPreservedEmbedderDataOffset
static const int kLastJSApiObjectType
static const int kExternalOneByteRepresentationTag
static const int kNodeStateIsWeakValue
static V8_EXPORT void CheckInitializedImpl(v8::Isolate *isolate)
static const int kTrustedPointerTableSize
static const int kBuiltinTier0TableOffset
static const int kForeignType
static const int kNodeClassIdOffset
static V8_INLINE int GetInstanceType(Address obj)
static const int kIsolateRootsOffset
static const int kIsolateApiCallbackThunkArgumentOffset
static const int kExternalPointerTableBasePointerOffset
static const int kFirstJSApiObjectType
static const int kOddballType
static const int kMapInstanceTypeOffset
static const int kLinearAllocationAreaSize
static const int kIsolateEmbedderDataOffset
static V8_INLINE int GetOddballKind(Address obj)
static V8_INLINE void * GetEmbedderData(const v8::Isolate *isolate, uint32_t slot)
static const int kNewAllocationInfoOffset
static V8_INLINE constexpr int SmiValue(Address value)
static const int kUndefinedOddballKind
static const int kEmbedderDataSlotSize
static const int kHeapObjectMapOffset
static V8_INLINE Address ReadTaggedPointerField(Address heap_object_ptr, int offset)
static const int kNullOddballKind
static V8_INLINE bool IsExternalTwoByteString(int instance_type)
static V8_INLINE constexpr Address IntToSmi(int value)
static const int kFirstNonstringType
static V8_INLINE void UpdateNodeState(Address *obj, uint8_t value)
static const int kBuiltinTier0EntryTableOffset
static const int kStringEncodingMask
static V8_INLINE Address GetRoot(v8::Isolate *isolate, int index)
static const int kLastEmbedderJSApiObjectType
static const int kVariousBooleanFlagsOffset
static const int kThreadLocalTopSize
static const int kTablesAlignmentPaddingSize
static const int kJSObjectHeaderSize
static V8_INLINE void SetEmbedderData(v8::Isolate *isolate, uint32_t slot, void *data)
static const int kFixedArrayHeaderSize
static const int kJSObjectType
static const int kTheHoleValueRootIndex
static V8_INLINE Address ReadExternalPointerField(v8::Isolate *isolate, Address heap_object_ptr, int offset)
static const int kStringResourceOffset
static const int kIsolateHandleScopeDataOffset
static const int kIsolateFastCCallCallerFpOffset
static const int kErrorMessageParamOffset
Address * allocate_impl(size_t n)
void deallocate_impl(Address *p, size_t n) noexcept
bool operator!=(const StrongRootAllocatorBase &other) const
bool operator==(const StrongRootAllocatorBase &other) const
StrongRootAllocatorBase(v8::Isolate *isolate)
StrongRootAllocatorBase(Heap *heap)
StrongRootAllocator(v8::Isolate *isolate)
StrongRootAllocator(Heap *heap)
StrongRootAllocator(const StrongRootAllocator< U > &other) noexcept
static V8_INLINE Address ValueAsAddress(const T *value)
static V8_INLINE T * HandleAsValue(const H< T, Ms... > &handle)
static V8_INLINE T * SlotAsValue(S *slot)
static constexpr Address kEmpty
static V8_INLINE bool IsEmpty(T *value)
constexpr WrappedIterator operator++(int) noexcept
constexpr WrappedIterator operator-(difference_type n) const noexcept
constexpr reference operator[](difference_type n) const noexcept
constexpr pointer operator->() const noexcept
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::pointer, ElementType * > pointer
constexpr WrappedIterator operator+(difference_type n) const noexcept
constexpr Iterator base() const noexcept
constexpr WrappedIterator & operator--() noexcept
constexpr WrappedIterator(const WrappedIterator< OtherIterator, OtherElementType > &it) noexcept
constexpr WrappedIterator operator--(int) noexcept
constexpr WrappedIterator() noexcept
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::reference, ElementType & > reference
constexpr reference operator*() const noexcept
constexpr WrappedIterator & operator+=(difference_type n) noexcept
constexpr WrappedIterator(Iterator it) noexcept
constexpr WrappedIterator & operator++() noexcept
typename std::iterator_traits< Iterator >::difference_type difference_type
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::value_type, ElementType > value_type
typename std::iterator_traits< Iterator >::iterator_category iterator_category
constexpr WrappedIterator & operator-=(difference_type n) noexcept
constexpr bool PointerCompressionIsEnabled()
constexpr int kCodePointerTableEntryCodeObjectOffset
Address SandboxedPointer_t
const int kApiSystemPointerSize
constexpr bool operator!=(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
constexpr size_t kMaxTrustedPointers
V8_EXPORT void VerifyHandleIsNonEmpty(bool is_empty)
constexpr uint64_t kAllExternalPointerTypeTags[]
constexpr IndirectPointerHandle kNullIndirectPointerHandle
constexpr int kTrustedPointerTableEntrySizeLog2
constexpr bool operator>=(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
Address ExternalPointer_t
constexpr uint64_t kExternalPointerTagShift
const intptr_t kHeapObjectTagMask
constexpr int kCodePointerTableEntryEntrypointOffset
constexpr size_t kMaxExternalPointers
const int kHeapObjectTagSize
constexpr size_t kTrustedPointerTableReservationSize
constexpr auto operator-(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept -> decltype(x.base() - y.base())
constexpr ExternalPointerHandle kNullExternalPointerHandle
constexpr uint32_t kCodePointerHandleMarker
const intptr_t kForwardingTagMask
constexpr uint32_t kCodePointerHandleShift
constexpr ExternalPointer_t kNullExternalPointer
constexpr int kCodePointerTableEntrySize
IndirectPointerHandle CodePointerHandle
constexpr bool kBuiltinCodeObjectsLiveInTrustedSpace
constexpr bool operator<(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
SmiTagging< kApiTaggedSize > PlatformSmiTagging
V8_EXPORT internal::Isolate * IsolateFromNeverReadOnlySpaceObject(Address obj)
constexpr bool SmiValuesAre32Bits()
constexpr bool SmiValuesAre31Bits()
constexpr uintptr_t kUintptrAllBitsSet
constexpr bool kAllCodeObjectsLiveInTrustedSpace
@ kExternalPointerNullTag
@ kExternalPointerFreeEntryTag
@ kExternalPointerEvacuationEntryTag
constexpr bool operator>(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
uint32_t ExternalPointerHandle
constexpr WrappedIterator< Iterator > operator+(typename WrappedIterator< Iterator, ElementType >::difference_type n, const WrappedIterator< Iterator, ElementType > &x) noexcept
constexpr TrustedPointerHandle kNullTrustedPointerHandle
uint32_t IndirectPointerHandle
constexpr uint64_t kExternalPointerTagMask
constexpr size_t kCodePointerTableReservationSize
constexpr int kTrustedPointerTableEntrySize
constexpr bool kRuntimeGeneratedCodeObjectsLiveInTrustedSpace
IndirectPointerHandle TrustedPointerHandle
const int kForwardingTagSize
V8_INLINE void PerformCastCheck(T *data)
constexpr bool SandboxIsEnabled()
constexpr int kCodePointerTableEntrySizeLog2
constexpr uint64_t kExternalPointerTagMaskWithoutMarkBit
constexpr bool operator==(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
const int kWeakHeapObjectTag
V8_EXPORT bool ShouldThrowOnError(internal::Isolate *isolate)
constexpr bool operator<=(const WrappedIterator< Iterator, ElementType > &x, const WrappedIterator< OtherIterator, OtherElementType > &y) noexcept
constexpr intptr_t kIntptrAllBitsSet
constexpr uint32_t kTrustedPointerHandleShift
const intptr_t kHeapObjectReferenceTagMask
constexpr size_t kMaxCodePointers
constexpr CodePointerHandle kNullCodePointerHandle
const intptr_t kSmiTagMask
constexpr uint64_t kExternalPointerMarkBit
constexpr int kGarbageCollectionReasonMaxValue
static void Perform(T *data)
static V8_INLINE constexpr bool IsValidSmi(intptr_t value)
static V8_INLINE constexpr int SmiToInt(Address value)
static V8_INLINE constexpr bool IsValidSmi(intptr_t value)
static V8_INLINE constexpr int SmiToInt(Address value)
#define EXTERNAL_POINTER_TAG_ENUM(Name, Tag)
#define ALL_EXTERNAL_POINTER_TAGS(V)
#define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS(Tag,...)
#define SHARED_EXTERNAL_POINTER_TAGS(V)
#define MAKE_TAG(HasMarkBit, TypeTag)
#define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V)
#define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag,...)