5#ifndef INCLUDE_V8_INTERNAL_H_
6#define INCLUDE_V8_INTERNAL_H_
23#if __has_include(<version>)
26#if defined(__cpp_lib_three_way_comparison) && \
27 __cpp_lib_three_way_comparison >= 201711L && \
28 defined(__cpp_lib_concepts) && __cpp_lib_concepts >= 202002L
32#define V8_HAVE_SPACESHIP_OPERATOR 1
34#define V8_HAVE_SPACESHIP_OPERATOR 0
53static constexpr Address kNullAddress = 0;
55constexpr int KB = 1024;
56constexpr int MB =
KB * 1024;
57constexpr int GB =
MB * 1024;
58#ifdef V8_TARGET_ARCH_X64
59constexpr size_t TB =
size_t{
GB} * 1024;
90template <
size_t tagged_ptr_size>
109 return static_cast<int32_t
>(
static_cast<uint32_t
>(value)) >> shift_bits;
112 template <
class T,
typename std::enable_if_t<std::is_
integral_v<T> &&
113 std::is_
signed_v<T>>* =
nullptr>
118 return (
static_cast<uintptr_t
>(value) -
125 typename std::enable_if_t<std::is_integral_v<T> &&
126 std::is_unsigned_v<T>>* =
nullptr>
128 static_assert(kSmiMaxValue <= std::numeric_limits<uintptr_t>::max());
135 return (
static_cast<uint64_t
>(value) -
142 static_assert(kSmiMaxValue <= std::numeric_limits<uint64_t>::max());
159 return static_cast<int>(
static_cast<intptr_t
>(value) >> shift_bits);
162 template <
class T,
typename std::enable_if_t<std::is_
integral_v<T> &&
163 std::is_
signed_v<T>>* =
nullptr>
166 return std::numeric_limits<int32_t>::min() <= value &&
167 value <= std::numeric_limits<int32_t>::max();
171 typename std::enable_if_t<std::is_integral_v<T> &&
172 std::is_unsigned_v<T>>* =
nullptr>
174 return value <= std::numeric_limits<int32_t>::max();
178#ifdef V8_COMPRESS_POINTERS
181constexpr size_t kPtrComprCageReservationSize =
size_t{1} << 32;
182constexpr size_t kPtrComprCageBaseAlignment =
size_t{1} << 32;
186 "Pointer compression can be enabled only for 64-bit architectures");
196#ifdef V8_31BIT_SMIS_ON_64BIT_ARCH
206const int kSmiMinValue =
static_cast<int>(PlatformSmiTagging::kSmiMinValue);
207const int kSmiMaxValue =
static_cast<int>(PlatformSmiTagging::kSmiMaxValue);
221#ifdef V8_ENABLE_SANDBOX
232#ifdef V8_ENABLE_SANDBOX
235#if defined(V8_TARGET_OS_ANDROID)
239constexpr size_t kSandboxSizeLog2 = 37;
240#elif defined(V8_TARGET_OS_IOS)
245constexpr size_t kSandboxSizeLog2 = 34;
248constexpr size_t kSandboxSizeLog2 = 40;
250constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2;
257constexpr size_t kSandboxAlignment = kPtrComprCageBaseAlignment;
263constexpr uint64_t kSandboxedPointerShift = 64 - kSandboxSizeLog2;
271constexpr size_t kSandboxGuardRegionSize = 32ULL *
GB + 4ULL *
GB;
273static_assert((kSandboxGuardRegionSize % kSandboxAlignment) == 0,
274 "The size of the guard regions around the sandbox must be a "
275 "multiple of its required alignment.");
287constexpr size_t kSandboxMinimumReservationSize = 8ULL *
GB;
289static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize,
290 "The minimum reservation size for a sandbox must be larger than "
291 "the pointer compression cage contained within it.");
297constexpr size_t kMaxSafeBufferSizeForSandbox = 32ULL *
GB - 1;
298static_assert(kMaxSafeBufferSizeForSandbox <= kSandboxGuardRegionSize,
299 "The maximum allowed buffer size must not be larger than the "
300 "sandbox's guard regions");
302constexpr size_t kBoundedSizeShift = 29;
303static_assert(1ULL << (64 - kBoundedSizeShift) ==
304 kMaxSafeBufferSizeForSandbox + 1,
305 "The maximum size of a BoundedSize must be synchronized with the "
306 "kMaxSafeBufferSizeForSandbox");
310#ifdef V8_COMPRESS_POINTERS
312#ifdef V8_TARGET_OS_ANDROID
318constexpr size_t kExternalPointerTableReservationSize = 256 *
MB;
324constexpr uint32_t kExternalPointerIndexShift = 7;
326constexpr size_t kExternalPointerTableReservationSize = 512 *
MB;
327constexpr uint32_t kExternalPointerIndexShift = 6;
331constexpr int kExternalPointerTableEntrySize = 8;
332constexpr int kExternalPointerTableEntrySizeLog2 = 3;
334 kExternalPointerTableReservationSize / kExternalPointerTableEntrySize;
336 "kExternalPointerTableReservationSize and "
337 "kExternalPointerIndexShift don't match");
368#ifdef V8_ENABLE_SANDBOX
388#ifdef V8_COMPRESS_POINTERS
401#ifdef V8_COMPRESS_POINTERS
405constexpr size_t kCppHeapPointerTableReservationSize =
406 kExternalPointerTableReservationSize;
407constexpr uint32_t kCppHeapPointerIndexShift = kExternalPointerIndexShift;
409constexpr int kCppHeapPointerTableEntrySize = 8;
410constexpr int kCppHeapPointerTableEntrySizeLog2 = 3;
412 kCppHeapPointerTableReservationSize / kCppHeapPointerTableEntrySize;
414 "kCppHeapPointerTableReservationSize and "
415 "kCppHeapPointerIndexShift don't match");
451template <
typename Tag>
453 static_assert(std::is_enum_v<Tag> &&
454 std::is_same_v<std::underlying_type_t<Tag>, uint16_t>,
455 "Tag parameter must be an enum with base type uint16_t");
474 constexpr size_t Size()
const {
486 return static_cast<uint32_t
>(tag) -
first <=
499 static_assert(std::is_same_v<std::underlying_type_t<Tag>, uint16_t>);
500 return (
static_cast<size_t>(
first) << 16) |
last;
683V8_INLINE static constexpr bool IsSharedExternalPointerType(
691V8_INLINE static constexpr bool IsMaybeReadOnlyExternalPointerType(
700V8_INLINE static constexpr bool IsManagedExternalPointerType(
712V8_INLINE static constexpr bool ExternalPointerCanBeEmpty(
776 "kTrustedPointerTableReservationSize and "
777 "kTrustedPointerHandleShift don't match");
825 "kCodePointerTableReservationSize and kCodePointerHandleShift don't match");
841 "Use GetCurrentIsolate() instead, which is guaranteed to return the same "
842 "isolate since https://crrev.com/c/6458560.")
858 return mapword ^ kMapWordXorMask;
865 static const int kHeapObjectMapOffset = 0;
867 static const int kStringResourceOffset =
872#ifdef V8_COMPRESS_POINTERS
873 static const int kJSAPIObjectWithEmbedderSlotsHeaderSize =
876 static const int kJSAPIObjectWithEmbedderSlotsHeaderSize =
882#ifdef V8_ENABLE_SANDBOX
883 static const int kEmbedderDataSlotExternalPointerOffset =
kApiTaggedSize;
885 static const int kEmbedderDataSlotExternalPointerOffset = 0;
888 static const int kStringRepresentationAndEncodingMask = 0x0f;
889 static const int kStringEncodingMask = 0x8;
890 static const int kExternalTwoByteRepresentationTag = 0x02;
891 static const int kExternalOneByteRepresentationTag = 0x0a;
893 static const uint32_t kNumIsolateDataSlots = 4;
895 static const int kNumberOfBooleanFlags = 6;
896 static const int kErrorMessageParamSize = 1;
897 static const int kTablesAlignmentPaddingSize = 1;
903 static const int kHandleScopeDataSize =
907 static const int kExternalPointerTableBasePointerOffset = 0;
908 static const int kSegmentedTableSegmentPoolSize = 4;
909 static const int kExternalPointerTableSize =
911 kSegmentedTableSegmentPoolSize *
sizeof(uint32_t);
912 static const int kTrustedPointerTableSize =
914 kSegmentedTableSegmentPoolSize *
sizeof(uint32_t);
915 static const int kTrustedPointerTableBasePointerOffset = 0;
918 static const int kIsolateCageBaseOffset = 0;
919 static const int kIsolateStackGuardOffset =
921 static const int kVariousBooleanFlagsOffset =
922 kIsolateStackGuardOffset + kStackGuardSize;
923 static const int kErrorMessageParamOffset =
924 kVariousBooleanFlagsOffset + kNumberOfBooleanFlags;
925 static const int kBuiltinTier0EntryTableOffset =
926 kErrorMessageParamOffset + kErrorMessageParamSize +
927 kTablesAlignmentPaddingSize + kRegExpStaticResultOffsetsVectorSize;
928 static const int kBuiltinTier0TableOffset =
929 kBuiltinTier0EntryTableOffset + kBuiltinTier0EntryTableSize;
930 static const int kNewAllocationInfoOffset =
931 kBuiltinTier0TableOffset + kBuiltinTier0TableSize;
932 static const int kOldAllocationInfoOffset =
933 kNewAllocationInfoOffset + kLinearAllocationAreaSize;
935 static const int kFastCCallAlignmentPaddingSize =
938 static const int kIsolateFastCCallCallerPcOffset =
939 kOldAllocationInfoOffset + kLinearAllocationAreaSize +
940 kFastCCallAlignmentPaddingSize;
941 static const int kIsolateFastCCallCallerFpOffset =
943 static const int kIsolateFastApiCallTargetOffset =
945 static const int kIsolateLongTaskStatsCounterOffset =
947 static const int kIsolateThreadLocalTopOffset =
949 static const int kIsolateHandleScopeDataOffset =
950 kIsolateThreadLocalTopOffset + kThreadLocalTopSize;
951 static const int kIsolateEmbedderDataOffset =
952 kIsolateHandleScopeDataOffset + kHandleScopeDataSize;
953#ifdef V8_COMPRESS_POINTERS
954 static const int kIsolateExternalPointerTableOffset =
956 static const int kIsolateSharedExternalPointerTableAddressOffset =
957 kIsolateExternalPointerTableOffset + kExternalPointerTableSize;
958 static const int kIsolateCppHeapPointerTableOffset =
960#ifdef V8_ENABLE_SANDBOX
961 static const int kIsolateTrustedCageBaseOffset =
962 kIsolateCppHeapPointerTableOffset + kExternalPointerTableSize;
963 static const int kIsolateTrustedPointerTableOffset =
965 static const int kIsolateSharedTrustedPointerTableAddressOffset =
966 kIsolateTrustedPointerTableOffset + kTrustedPointerTableSize;
967 static const int kIsolateTrustedPointerPublishingScopeOffset =
969 static const int kIsolateCodePointerTableBaseAddressOffset =
971 static const int kIsolateApiCallbackThunkArgumentOffset =
974 static const int kIsolateApiCallbackThunkArgumentOffset =
975 kIsolateCppHeapPointerTableOffset + kExternalPointerTableSize;
978 static const int kIsolateApiCallbackThunkArgumentOffset =
981 static const int kJSDispatchTableOffset =
983 static const int kIsolateRegexpExecVectorArgumentOffset =
985 static const int kContinuationPreservedEmbedderDataOffset =
987 static const int kIsolateRootsOffset =
991 static const int kDisallowGarbageCollectionAlign =
alignof(uint32_t);
992 static const int kDisallowGarbageCollectionSize =
sizeof(uint32_t);
994#if V8_STATIC_ROOTS_BOOL
997#define EXPORTED_STATIC_ROOTS_PTR_LIST(V) \
998 V(UndefinedValue, 0x11) \
1000 V(TrueValue, 0x71) \
1001 V(FalseValue, 0x55) \
1002 V(EmptyString, 0x49) \
1003 V(TheHoleValue, 0x7d9)
1005 using Tagged_t = uint32_t;
1006 struct StaticReadOnlyRoot {
1007#define DEF_ROOT(name, value) static constexpr Tagged_t k##name = value;
1008 EXPORTED_STATIC_ROOTS_PTR_LIST(DEF_ROOT)
1012 static constexpr Tagged_t kStringMapLowerBound = 0;
1013 static constexpr Tagged_t kStringMapUpperBound = 0x425;
1015#define PLUSONE(...) +1
1016 static constexpr size_t kNumberOfExportedStaticRoots =
1017 2 + EXPORTED_STATIC_ROOTS_PTR_LIST(PLUSONE);
1023 static const int kUndefinedValueRootIndex = 0;
1024 static const int kTheHoleValueRootIndex = 1;
1025 static const int kNullValueRootIndex = 2;
1026 static const int kTrueValueRootIndex = 3;
1027 static const int kFalseValueRootIndex = 4;
1028 static const int kEmptyStringRootIndex = 5;
1032 static const int kNodeStateMask = 0x3;
1033 static const int kNodeStateIsWeakValue = 2;
1035 static const int kFirstNonstringType = 0x80;
1036 static const int kOddballType = 0x83;
1037 static const int kForeignType = 0xcc;
1038 static const int kJSSpecialApiObjectType = 0x410;
1039 static const int kJSObjectType = 0x421;
1040 static const int kFirstJSApiObjectType = 0x422;
1041 static const int kLastJSApiObjectType = 0x80A;
1044 static const int kFirstEmbedderJSApiObjectType = 0;
1045 static const int kLastEmbedderJSApiObjectType =
1046 kLastJSApiObjectType - kFirstJSApiObjectType;
1048 static const int kUndefinedOddballKind = 4;
1049 static const int kNullOddballKind = 3;
1053 static const int kDontThrow = 0;
1054 static const int kThrowOnError = 1;
1055 static const int kInferShouldThrowMode = 2;
1059 static constexpr size_t kExternalAllocationSoftLimit = 64 * 1024 * 1024;
1061#ifdef V8_MAP_PACKING
1062 static const uintptr_t kMapWordMetadataMask = 0xffffULL << 48;
1064 static const uintptr_t kMapWordSignature = 0b10;
1069 static const int kMapWordXorMask = 0b11;
1074#ifdef V8_ENABLE_CHECKS
1075 CheckInitializedImpl(isolate);
1084 return PlatformSmiTagging::SmiToInt(value);
1088 return (value << (
kSmiTagSize + PlatformSmiTagging::kSmiShiftSize)) |
1093 return AddressToSmi(
static_cast<Address>(value));
1096 template <
typename T,
1097 typename std::enable_if_t<std::is_integral_v<T>>* =
nullptr>
1099 return AddressToSmi(
static_cast<Address>(value));
1102 template <
typename T,
1103 typename std::enable_if_t<std::is_integral_v<T>>* =
nullptr>
1105 return PlatformSmiTagging::IsValidSmi(value);
1108 template <
typename T,
1109 typename std::enable_if_t<std::is_integral_v<T>>* =
nullptr>
1111 if (
V8_LIKELY(PlatformSmiTagging::IsValidSmi(value))) {
1112 return {AddressToSmi(
static_cast<Address>(value))};
1117#if V8_STATIC_ROOTS_BOOL
1119 return static_cast<Tagged_t
>(obj) == constant;
1122 V8_INLINE static bool CheckInstanceMapRange(
Address obj, Tagged_t first_map,
1123 Tagged_t last_map) {
1124 auto map = ReadRawField<Tagged_t>(obj, kHeapObjectMapOffset);
1125#ifdef V8_MAP_PACKING
1126 map = UnpackMapWord(map);
1128 return map >= first_map && map <= last_map;
1133 Address map = ReadTaggedPointerField(obj, kHeapObjectMapOffset);
1134#ifdef V8_MAP_PACKING
1135 map = UnpackMapWord(map);
1137 return ReadRawField<uint16_t>(map, kMapInstanceTypeOffset);
1141 if (!HasHeapObjectTag(obj))
return kNullAddress;
1142 Address map = ReadTaggedPointerField(obj, kHeapObjectMapOffset);
1143#ifdef V8_MAP_PACKING
1144 map = UnpackMapWord(map);
1150 return SmiValue(ReadTaggedSignedField(obj, kOddballKindOffset));
1154 int representation = (instance_type & kStringRepresentationAndEncodingMask);
1155 return representation == kExternalTwoByteRepresentationTag;
1159 static_assert(kJSObjectType + 1 == kFirstJSApiObjectType);
1160 static_assert(kJSObjectType < kLastJSApiObjectType);
1161 static_assert(kFirstJSApiObjectType < kLastJSApiObjectType);
1163 return instance_type == kJSSpecialApiObjectType ||
1165 (
static_cast<unsigned>(
static_cast<unsigned>(instance_type) -
1166 static_cast<unsigned>(kJSObjectType)) <=
1167 static_cast<unsigned>(kLastJSApiObjectType - kJSObjectType));
1171 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
1172 return *addr &
static_cast<uint8_t
>(1U << shift);
1176 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
1177 uint8_t mask =
static_cast<uint8_t
>(1U << shift);
1178 *addr =
static_cast<uint8_t
>((*addr & ~mask) | (value << shift));
1182 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
1183 return *addr & kNodeStateMask;
1187 uint8_t* addr =
reinterpret_cast<uint8_t*
>(obj) + kNodeFlagsOffset;
1188 *addr =
static_cast<uint8_t
>((*addr & ~kNodeStateMask) | value);
1195 *
reinterpret_cast<void**
>(addr) = data;
1202 return *
reinterpret_cast<void* const*
>(addr);
1207 reinterpret_cast<Address>(isolate) + kIsolateLongTaskStatsCounterOffset;
1208 ++(*
reinterpret_cast<size_t*
>(addr));
1212 Address addr =
reinterpret_cast<Address>(isolate) + kIsolateRootsOffset +
1214 return reinterpret_cast<Address*
>(addr);
1218#if V8_STATIC_ROOTS_BOOL
1220 reinterpret_cast<uintptr_t
>(isolate) + kIsolateCageBaseOffset);
1222#define DECOMPRESS_ROOT(name, ...) \
1223 case k##name##RootIndex: \
1224 return base + StaticReadOnlyRoot::k##name;
1225 EXPORTED_STATIC_ROOTS_PTR_LIST(DECOMPRESS_ROOT)
1226#undef DECOMPRESS_ROOT
1227#undef EXPORTED_STATIC_ROOTS_PTR_LIST
1232 return *GetRootSlot(isolate, index);
1235#ifdef V8_ENABLE_SANDBOX
1238 kIsolateExternalPointerTableOffset +
1239 kExternalPointerTableBasePointerOffset;
1240 return *
reinterpret_cast<Address**
>(addr);
1246 kIsolateSharedExternalPointerTableAddressOffset;
1247 addr = *
reinterpret_cast<Address*
>(addr);
1248 addr += kExternalPointerTableBasePointerOffset;
1249 return *
reinterpret_cast<Address**
>(addr);
1253 template <
typename T>
1256#ifdef V8_COMPRESS_POINTERS
1263 memcpy(&r,
reinterpret_cast<void*
>(addr),
sizeof(T));
1267 return *
reinterpret_cast<const T*
>(addr);
1272#ifdef V8_COMPRESS_POINTERS
1273 uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
1274 Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
1275 return base +
static_cast<Address>(
static_cast<uintptr_t
>(value));
1277 return ReadRawField<Address>(heap_object_ptr, offset);
1283#ifdef V8_COMPRESS_POINTERS
1284 uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset);
1285 return static_cast<Address>(
static_cast<uintptr_t
>(value));
1287 return ReadRawField<Address>(heap_object_ptr, offset);
1292 "Use GetCurrentIsolateForSandbox() instead, which is guaranteed to "
1293 "return the same isolate since https://crrev.com/c/6458560.")
1295#ifdef V8_ENABLE_SANDBOX
1296 return GetCurrentIsolate();
1308#ifdef V8_ENABLE_SANDBOX
1309 return GetCurrentIsolate();
1316 template <ExternalPo
interTagRange tag_range>
1320#ifdef V8_ENABLE_SANDBOX
1321 static_assert(!tag_range.IsEmpty());
1324 Address* table = IsSharedExternalPointerType(tag_range)
1325 ? GetSharedExternalPointerTableBase(isolate)
1326 : GetExternalPointerTableBase(isolate);
1328 ReadRawField<ExternalPointerHandle>(heap_object_ptr, offset);
1329 uint32_t index = handle >> kExternalPointerIndexShift;
1330 std::atomic<Address>* ptr =
1331 reinterpret_cast<std::atomic<Address>*
>(&table[index]);
1332 Address entry = std::atomic_load_explicit(ptr, std::memory_order_relaxed);
1335 if (
V8_LIKELY(tag_range.Contains(actual_tag))) {
1342 return ReadRawField<Address>(heap_object_ptr, offset);
1346#ifdef V8_COMPRESS_POINTERS
1348 return addr & -
static_cast<intptr_t
>(kPtrComprCageBaseAlignment);
1352 return static_cast<uint32_t
>(value);
1357 Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr);
1358 return base +
static_cast<Address>(
static_cast<uintptr_t
>(value));
1366template <
bool PerformCheck>
1385 !std::is_same_v<Data, std::remove_cv_t<T>>>::Perform(data);
1400 Heap*
heap()
const {
return heap_; }
1406 return a.heap_ == b.heap_;
1429template <
typename T>
1434 template <
typename HeapOrIsolateT>
1436 template <
typename U>
1439 using std::allocator<T>::allocate;
1440 using std::allocator<T>::deallocate;
1445template <
typename Iterator,
typename =
void>
1447template <
typename Iterator>
1449 Iterator, std::void_t<typename Iterator::iterator_concept>> =
true;
1451template <
typename Iterator,
typename =
void>
1453template <
typename Iterator>
1455 Iterator, std::void_t<typename Iterator::iterator_category>> =
true;
1460template <
typename Iterator,
typename =
void>
1463template <
typename Iterator>
1465 Iterator, std::enable_if_t<kHaveIteratorConcept<Iterator>>> {
1469template <
typename Iterator>
1471 Iterator, std::enable_if_t<kHaveIteratorCategory<Iterator> &&
1472 !kHaveIteratorConcept<Iterator>>> {
1478#if __has_include(<ranges>)
1479 using iterator_concept =
1480 typename std::iterator_traits<Iterator>::iterator_concept;
1488template <
typename Iterator,
typename ElementType =
void>
1492 std::is_void_v<ElementType> ||
1493 (std::is_convertible_v<typename std::iterator_traits<Iterator>::pointer,
1494 std::add_pointer_t<ElementType>> &&
1495 std::is_convertible_v<typename std::iterator_traits<Iterator>::reference,
1496 std::add_lvalue_reference_t<ElementType>>));
1499 typename std::iterator_traits<Iterator>::difference_type;
1501 std::conditional_t<std::is_void_v<ElementType>,
1502 typename std::iterator_traits<Iterator>::value_type,
1505 std::conditional_t<std::is_void_v<ElementType>,
1506 typename std::iterator_traits<Iterator>::pointer,
1507 std::add_pointer_t<ElementType>>;
1509 std::conditional_t<std::is_void_v<ElementType>,
1510 typename std::iterator_traits<Iterator>::reference,
1511 std::add_lvalue_reference_t<ElementType>>;
1513 typename std::iterator_traits<Iterator>::iterator_category;
1520 template <
typename OtherIterator,
typename OtherElementType,
1521 typename = std::enable_if_t<
1522 std::is_convertible_v<OtherIterator, Iterator>>>
1525 : it_(other.base()) {}
1529 if constexpr (std::is_pointer_v<Iterator>) {
1532 return it_.operator->();
1536 template <
typename OtherIterator,
typename OtherElementType>
1540 return it_ == other.base();
1542#if V8_HAVE_SPACESHIP_OPERATOR
1543 template <
typename OtherIterator,
typename OtherElementType>
1544 [[nodiscard]]
constexpr auto operator<=>(
1547 if constexpr (std::three_way_comparable_with<Iterator, OtherIterator>) {
1548 return it_ <=> other.base();
1549 }
else if constexpr (std::totally_ordered_with<Iterator, OtherIterator>) {
1550 if (it_ < other.base()) {
1551 return std::strong_ordering::less;
1553 return (it_ > other.base()) ? std::strong_ordering::greater
1554 : std::strong_ordering::equal;
1556 if (it_ < other.base()) {
1557 return std::partial_ordering::less;
1559 if (other.base() < it_) {
1560 return std::partial_ordering::greater;
1562 return (it_ == other.base()) ? std::partial_ordering::equivalent
1563 : std::partial_ordering::unordered;
1569 template <
typename OtherIterator,
typename OtherElementType>
1573 return it_ != other.base();
1576 template <
typename OtherIterator,
typename OtherElementType>
1580 return it_ < other.base();
1582 template <
typename OtherIterator,
typename OtherElementType>
1586 return it_ <= other.base();
1588 template <
typename OtherIterator,
typename OtherElementType>
1592 return it_ > other.base();
1594 template <
typename OtherIterator,
typename OtherElementType>
1598 return it_ >= other.base();
1642 template <
typename OtherIterator,
typename OtherElementType>
1646 return it_ - other.base();
1653 [[nodiscard]]
constexpr const Iterator&
base() const noexcept {
return it_; }
1670#ifdef V8_ENABLE_DIRECT_HANDLE
1671 static constexpr Address kTaggedNullAddress = 1;
1680 template <
typename T>
1688 template <
template <
typename T,
typename... Ms>
typename H,
typename T,
1691 return handle.template value<T>();
1694#ifdef V8_ENABLE_DIRECT_HANDLE
1696 template <
typename T>
1698 return reinterpret_cast<Address>(value);
1701 template <
typename T,
bool check_null = true,
typename S>
1703 if (check_null && slot ==
nullptr) {
1704 return reinterpret_cast<T*
>(kTaggedNullAddress);
1706 return *
reinterpret_cast<T**
>(slot);
1709 template <
typename T>
1714 template <
typename T>
1716 return reinterpret_cast<T*
>(repr);
1721 template <
typename T>
1723 return *
reinterpret_cast<const Address*
>(value);
1726 template <
typename T,
bool check_null = true,
typename S>
1728 return reinterpret_cast<T*
>(slot);
1731 template <
typename T>
1734 reinterpret_cast<const Address*
>(value));
1737 template <
typename T>
1739 return reinterpret_cast<T*
>(repr);
1760 template <
typename T1,
typename T2>
1762 if (lhs.IsEmpty())
return rhs.IsEmpty();
1763 if (rhs.IsEmpty())
return false;
1764 return lhs.ptr() == rhs.ptr();
Definition: v8-isolate.h:290
Definition: v8-internal.h:1390
Definition: v8-internal.h:1748
static bool EqualHandles(const T1 &lhs, const T2 &rhs)
Definition: v8-internal.h:1761
Definition: v8-internal.h:854
static Address LoadMap(Address obj)
Definition: v8-internal.h:1140
static bool IsExternalTwoByteString(int instance_type)
Definition: v8-internal.h:1153
static Address ReadExternalPointerField(v8::Isolate *isolate, Address heap_object_ptr, int offset)
Definition: v8-internal.h:1317
static constexpr bool HasHeapObjectTag(Address value)
Definition: v8-internal.h:1079
static Address GetRoot(v8::Isolate *isolate, int index)
Definition: v8-internal.h:1217
static uint8_t GetNodeFlag(Address *obj, int shift)
Definition: v8-internal.h:1170
static uint8_t GetNodeState(Address *obj)
Definition: v8-internal.h:1181
static constexpr Address AddressToSmi(Address value)
Definition: v8-internal.h:1087
static void CheckInitialized(v8::Isolate *isolate)
Definition: v8-internal.h:1073
static void UpdateNodeState(Address *obj, uint8_t value)
Definition: v8-internal.h:1186
static constexpr Address IntegralToSmi(T value)
Definition: v8-internal.h:1098
static constexpr bool IsValidSmi(T value)
Definition: v8-internal.h:1104
static constexpr bool CanHaveInternalField(int instance_type)
Definition: v8-internal.h:1158
static constexpr Address IntToSmi(int value)
Definition: v8-internal.h:1092
static void CheckInitializedImpl(v8::Isolate *isolate)
static void * GetEmbedderData(const v8::Isolate *isolate, uint32_t slot)
Definition: v8-internal.h:1198
static int GetInstanceType(Address obj)
Definition: v8-internal.h:1132
static Address ReadTaggedSignedField(Address heap_object_ptr, int offset)
Definition: v8-internal.h:1281
static Address ReadTaggedPointerField(Address heap_object_ptr, int offset)
Definition: v8-internal.h:1270
static void SetEmbedderData(v8::Isolate *isolate, uint32_t slot, void *data)
Definition: v8-internal.h:1191
static Address * GetRootSlot(v8::Isolate *isolate, int index)
Definition: v8-internal.h:1211
static constexpr int SmiValue(Address value)
Definition: v8-internal.h:1083
static void UpdateNodeFlag(Address *obj, bool value, int shift)
Definition: v8-internal.h:1175
static void IncrementLongTasksStatsCounter(v8::Isolate *isolate)
Definition: v8-internal.h:1205
static T ReadRawField(Address heap_object_ptr, int offset)
Definition: v8-internal.h:1254
static v8::Isolate * GetCurrentIsolate()
static v8::Isolate * GetCurrentIsolateForSandbox()
Definition: v8-internal.h:1307
static int GetOddballKind(Address obj)
Definition: v8-internal.h:1149
static constexpr std::optional< Address > TryIntegralToSmi(T value)
Definition: v8-internal.h:1110
Definition: v8-internal.h:1398
friend bool operator==(const StrongRootAllocatorBase &a, const StrongRootAllocatorBase &b)
Definition: v8-internal.h:1402
StrongRootAllocatorBase(Heap *heap)
Definition: v8-internal.h:1410
Address * allocate_impl(size_t n)
StrongRootAllocatorBase(v8::Isolate *isolate)
StrongRootAllocatorBase(LocalIsolate *isolate)
void deallocate_impl(Address *p, size_t n) noexcept
StrongRootAllocatorBase(LocalHeap *heap)
StrongRootAllocatorBase(Isolate *isolate)
Heap * heap() const
Definition: v8-internal.h:1400
Definition: v8-internal.h:1430
StrongRootAllocator(HeapOrIsolateT *)
Definition: v8-internal.h:1435
T value_type
Definition: v8-internal.h:1432
StrongRootAllocator(const StrongRootAllocator< U > &other) noexcept
Definition: v8-internal.h:1437
Definition: v8-internal.h:1662
static Address ValueAsAddress(const T *value)
Definition: v8-internal.h:1722
static T * ReprAsValue(InternalRepresentationType repr)
Definition: v8-internal.h:1738
internal::Address * InternalRepresentationType
Definition: v8-internal.h:1676
static T * SlotAsValue(S *slot)
Definition: v8-internal.h:1727
static T * HandleAsValue(const H< T, Ms... > &handle)
Definition: v8-internal.h:1690
static InternalRepresentationType ValueAsRepr(const T *value)
Definition: v8-internal.h:1732
static bool IsEmpty(T *value)
Definition: v8-internal.h:1681
static constexpr InternalRepresentationType kEmpty
Definition: v8-internal.h:1677
Definition: v8-internal.h:1489
constexpr WrappedIterator & operator-=(difference_type n) noexcept
Definition: v8-internal.h:1639
constexpr WrappedIterator operator--(int) noexcept
Definition: v8-internal.h:1616
constexpr WrappedIterator & operator+=(difference_type n) noexcept
Definition: v8-internal.h:1631
constexpr const Iterator & base() const noexcept
Definition: v8-internal.h:1653
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::value_type, ElementType > value_type
Definition: v8-internal.h:1503
constexpr WrappedIterator & operator++() noexcept
Definition: v8-internal.h:1602
constexpr pointer operator->() const noexcept
Definition: v8-internal.h:1528
constexpr reference operator[](difference_type n) const noexcept
Definition: v8-internal.h:1648
typename std::iterator_traits< Iterator >::difference_type difference_type
Definition: v8-internal.h:1499
constexpr bool operator!=(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1570
constexpr bool operator>=(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1595
constexpr bool operator<(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1577
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::reference, std::add_lvalue_reference_t< ElementType > > reference
Definition: v8-internal.h:1511
constexpr WrappedIterator & operator--() noexcept
Definition: v8-internal.h:1612
constexpr WrappedIterator() noexcept=default
constexpr bool operator<=(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1583
constexpr WrappedIterator(const WrappedIterator< OtherIterator, OtherElementType > &other) noexcept
Definition: v8-internal.h:1523
constexpr bool operator>(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1589
typename std::iterator_traits< Iterator >::iterator_category iterator_category
Definition: v8-internal.h:1513
constexpr reference operator*() const noexcept
Definition: v8-internal.h:1527
constexpr auto operator-(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1643
friend constexpr WrappedIterator operator+(difference_type n, const WrappedIterator &x) noexcept
Definition: v8-internal.h:1627
constexpr WrappedIterator operator+(difference_type n) const noexcept
Definition: v8-internal.h:1621
constexpr WrappedIterator operator++(int) noexcept
Definition: v8-internal.h:1606
constexpr WrappedIterator operator-(difference_type n) const noexcept
Definition: v8-internal.h:1635
std::conditional_t< std::is_void_v< ElementType >, typename std::iterator_traits< Iterator >::pointer, std::add_pointer_t< ElementType > > pointer
Definition: v8-internal.h:1507
constexpr bool operator==(const WrappedIterator< OtherIterator, OtherElementType > &other) const noexcept
Definition: v8-internal.h:1537
const intptr_t kHeapObjectTagMask
Definition: v8-internal.h:75
constexpr uint64_t kCppHeapPointerMarkBit
Definition: v8-internal.h:397
constexpr int kCodePointerTableEntrySizeLog2
Definition: v8-internal.h:820
constexpr bool kRuntimeGeneratedCodeObjectsLiveInTrustedSpace
Definition: v8-internal.h:832
internal::Isolate * IsolateFromNeverReadOnlySpaceObject(Address obj)
constexpr uint64_t kExternalPointerTagShift
Definition: v8-internal.h:347
IndirectPointerHandle TrustedPointerHandle
Definition: v8-internal.h:755
const int kApiSystemPointerSize
Definition: v8-internal.h:65
constexpr bool SandboxIsEnabled()
Definition: v8-internal.h:220
const int kApiDoubleSize
Definition: v8-internal.h:66
constexpr size_t kMaxCppHeapPointers
Definition: v8-internal.h:420
constexpr intptr_t kIntptrAllBitsSet
Definition: v8-internal.h:93
constexpr int GB
Definition: v8-internal.h:57
void VerifyHandleIsNonEmpty(bool is_empty)
const int kApiInt32Size
Definition: v8-internal.h:67
const int kForwardingTagSize
Definition: v8-internal.h:82
uint32_t CppHeapPointerHandle
Definition: v8-internal.h:382
const intptr_t kForwardingTagMask
Definition: v8-internal.h:83
void PrintPropertyCallbackInfo(void *property_callback_info)
constexpr ExternalPointerTagRange kAnyManagedResourceExternalPointerTag(kFirstManagedResourceTag, kLastManagedResourceTag)
IndirectPointerHandle CodePointerHandle
Definition: v8-internal.h:793
constexpr uint64_t kExternalPointerPayloadMask
Definition: v8-internal.h:354
const int kSmiTagSize
Definition: v8-internal.h:87
const int kApiInt64Size
Definition: v8-internal.h:68
constexpr ExternalPointerTagRange kAnyExternalPointerTagRange(kFirstExternalPointerTag, kLastExternalPointerTag)
constexpr uint64_t kExternalPointerTagMask
Definition: v8-internal.h:348
constexpr int kCodePointerTableEntryCodeObjectOffset
Definition: v8-internal.h:828
constexpr int kTrustedPointerTableEntrySizeLog2
Definition: v8-internal.h:772
constexpr int kTrustedPointerTableEntrySize
Definition: v8-internal.h:771
constexpr uint64_t kCppHeapPointerPayloadShift
Definition: v8-internal.h:399
constexpr ExternalPointer_t kNullExternalPointer
Definition: v8-internal.h:374
Address ExternalPointer_t
Definition: v8-internal.h:371
uint32_t IndirectPointerHandle
Definition: v8-internal.h:735
constexpr CppHeapPointer_t kNullCppHeapPointer
Definition: v8-internal.h:394
constexpr ExternalPointerTagRange kAnySharedExternalPointerTagRange(kFirstSharedExternalPointerTag, kLastSharedExternalPointerTag)
const int kApiSizetSize
Definition: v8-internal.h:69
constexpr uint64_t kExternalPointerTagAndMarkbitMask
Definition: v8-internal.h:353
constexpr int kCodePointerTableEntryEntrypointOffset
Definition: v8-internal.h:827
constexpr size_t kMaxExternalPointers
Definition: v8-internal.h:342
constexpr size_t kCodePointerTableReservationSize
Definition: v8-internal.h:798
constexpr TrustedPointerHandle kNullTrustedPointerHandle
Definition: v8-internal.h:767
const int kWeakHeapObjectTag
Definition: v8-internal.h:73
constexpr ExternalPointerHandle kNullExternalPointerHandle
Definition: v8-internal.h:375
constexpr ExternalPointerTagRange kAnyMaybeReadOnlyExternalPointerTagRange(kFirstMaybeReadOnlyExternalPointerTag, kLastMaybeReadOnlyExternalPointerTag)
constexpr uintptr_t kUintptrAllBitsSet
Definition: v8-internal.h:94
const int kForwardingTag
Definition: v8-internal.h:81
const intptr_t kHeapObjectReferenceTagMask
Definition: v8-internal.h:76
constexpr bool SmiValuesAre31Bits()
Definition: v8-internal.h:208
constexpr size_t kMaxTrustedPointers
Definition: v8-internal.h:773
bool ShouldThrowOnError(internal::Isolate *isolate)
constexpr uint64_t kCppHeapPointerTagShift
Definition: v8-internal.h:398
constexpr ExternalPointerTagRange kAnyInterceptorInfoExternalPointerTagRange(kFirstInterceptorInfoExternalPointerTag, kLastInterceptorInfoExternalPointerTag)
constexpr int KB
Definition: v8-internal.h:55
constexpr bool kBuiltinCodeObjectsLiveInTrustedSpace
Definition: v8-internal.h:833
constexpr uint32_t kTrustedPointerHandleShift
Definition: v8-internal.h:764
constexpr uint32_t kCodePointerHandleShift
Definition: v8-internal.h:802
constexpr ExternalPointerTagRange kAnyManagedExternalPointerTagRange(kFirstManagedExternalPointerTag, kLastManagedExternalPointerTag)
const int kHeapObjectTag
Definition: v8-internal.h:72
const int kSmiShiftSize
Definition: v8-internal.h:204
constexpr size_t kMaxCodePointers
Definition: v8-internal.h:821
constexpr bool kHaveIteratorCategory
Definition: v8-internal.h:1452
SmiTagging< kApiTaggedSize > PlatformSmiTagging
Definition: v8-internal.h:199
ExternalPointerTag
Definition: v8-internal.h:552
@ kLastForeignExternalPointerTag
Definition: v8-internal.h:648
@ kApiIndexedPropertyDescriptorCallbackTag
Definition: v8-internal.h:595
@ kGenericForeignTag
Definition: v8-internal.h:608
@ kFirstMaybeReadOnlyExternalPointerTag
Definition: v8-internal.h:578
@ kTemporalInstantTag
Definition: v8-internal.h:639
@ kTemporalPlainYearMonthTag
Definition: v8-internal.h:643
@ kExternalPointerEvacuationEntryTag
Definition: v8-internal.h:656
@ kFirstSharedExternalPointerTag
Definition: v8-internal.h:564
@ kApiNamedPropertyDefinerCallbackTag
Definition: v8-internal.h:589
@ kLastSharedExternalPointerTag
Definition: v8-internal.h:568
@ kD8WorkerTag
Definition: v8-internal.h:646
@ kApiIndexedPropertySetterCallbackTag
Definition: v8-internal.h:594
@ kWasmManagedDataTag
Definition: v8-internal.h:626
@ kLastExternalPointerTag
Definition: v8-internal.h:659
@ kIcuBreakIteratorTag
Definition: v8-internal.h:628
@ kMicrotaskCallbackDataTag
Definition: v8-internal.h:614
@ kWasmNativeModuleTag
Definition: v8-internal.h:627
@ kApiIndexedPropertyGetterCallbackTag
Definition: v8-internal.h:593
@ kApiNamedPropertyDescriptorCallbackTag
Definition: v8-internal.h:588
@ kAccessorInfoGetterTag
Definition: v8-internal.h:580
@ kTemporalPlainMonthDayTag
Definition: v8-internal.h:644
@ kIcuCollatorTag
Definition: v8-internal.h:637
@ kIcuSimpleDateFormatTag
Definition: v8-internal.h:632
@ kApiIndexedPropertyDefinerCallbackTag
Definition: v8-internal.h:596
@ kSyntheticModuleTag
Definition: v8-internal.h:612
@ kD8ModuleEmbedderDataTag
Definition: v8-internal.h:647
@ kExternalStringResourceTag
Definition: v8-internal.h:566
@ kWasmFuncDataTag
Definition: v8-internal.h:625
@ kExternalObjectValueTag
Definition: v8-internal.h:577
@ kWaiterQueueForeignTag
Definition: v8-internal.h:618
@ kAccessorInfoSetterTag
Definition: v8-internal.h:581
@ kApiNamedPropertyDeleterCallbackTag
Definition: v8-internal.h:590
@ kApiAccessCheckCallbackTag
Definition: v8-internal.h:610
@ kApiAbortScriptExecutionCallbackTag
Definition: v8-internal.h:611
@ kMicrotaskCallbackTag
Definition: v8-internal.h:613
@ kIcuLocalizedNumberFormatterTag
Definition: v8-internal.h:635
@ kApiNamedPropertyGetterCallbackTag
Definition: v8-internal.h:586
@ kApiNamedPropertySetterCallbackTag
Definition: v8-internal.h:587
@ kApiIndexedPropertyEnumeratorCallbackTag
Definition: v8-internal.h:598
@ kExternalPointerFreeEntryTag
Definition: v8-internal.h:657
@ kFirstInterceptorInfoExternalPointerTag
Definition: v8-internal.h:584
@ kCFunctionTag
Definition: v8-internal.h:615
@ kIcuUnicodeStringTag
Definition: v8-internal.h:629
@ kLastManagedExternalPointerTag
Definition: v8-internal.h:649
@ kWaiterQueueNodeTag
Definition: v8-internal.h:565
@ kGenericManagedTag
Definition: v8-internal.h:623
@ kExternalPointerNullTag
Definition: v8-internal.h:554
@ kExternalStringResourceDataTag
Definition: v8-internal.h:567
@ kWasmStackMemoryTag
Definition: v8-internal.h:604
@ kLastManagedResourceTag
Definition: v8-internal.h:653
@ kExternalPointerZappedEntryTag
Definition: v8-internal.h:655
@ kApiNamedPropertyQueryCallbackTag
Definition: v8-internal.h:585
@ kEmbedderDataSlotPayloadTag
Definition: v8-internal.h:573
@ kFirstForeignExternalPointerTag
Definition: v8-internal.h:607
@ kTemporalPlainDateTimeTag
Definition: v8-internal.h:642
@ kIcuListFormatterTag
Definition: v8-internal.h:630
@ kDisplayNamesInternalTag
Definition: v8-internal.h:645
@ kFirstManagedResourceTag
Definition: v8-internal.h:621
@ kFirstManagedExternalPointerTag
Definition: v8-internal.h:622
@ kTemporalPlainTimeTag
Definition: v8-internal.h:641
@ kIcuPluralRulesTag
Definition: v8-internal.h:636
@ kApiIndexedPropertyQueryCallbackTag
Definition: v8-internal.h:592
@ kIcuLocaleTag
Definition: v8-internal.h:631
@ kMessageListenerTag
Definition: v8-internal.h:617
@ kApiIndexedPropertyDeleterCallbackTag
Definition: v8-internal.h:597
@ kTemporalDurationTag
Definition: v8-internal.h:638
@ kLastInterceptorInfoExternalPointerTag
Definition: v8-internal.h:599
@ kIcuRelativeDateTimeFormatterTag
Definition: v8-internal.h:634
@ kWasmWasmStreamingTag
Definition: v8-internal.h:624
@ kNativeContextMicrotaskQueueTag
Definition: v8-internal.h:572
@ kLastMaybeReadOnlyExternalPointerTag
Definition: v8-internal.h:602
@ kArrayBufferExtensionTag
Definition: v8-internal.h:652
@ kIcuDateIntervalFormatTag
Definition: v8-internal.h:633
@ kCFunctionInfoTag
Definition: v8-internal.h:616
@ kFirstExternalPointerTag
Definition: v8-internal.h:553
@ kApiNamedPropertyEnumeratorCallbackTag
Definition: v8-internal.h:591
@ kFunctionTemplateInfoCallbackTag
Definition: v8-internal.h:579
@ kTemporalPlainDateTag
Definition: v8-internal.h:640
const int kSmiValueSize
Definition: v8-internal.h:205
constexpr ExternalPointerTagRange kAnyForeignExternalPointerTagRange(kFirstForeignExternalPointerTag, kLastForeignExternalPointerTag)
constexpr bool SmiValuesAre32Bits()
Definition: v8-internal.h:209
TagRange< ExternalPointerTag > ExternalPointerTagRange
Definition: v8-internal.h:662
constexpr IndirectPointerHandle kNullIndirectPointerHandle
Definition: v8-internal.h:738
uintptr_t Address
Definition: v8-internal.h:52
void PerformCastCheck(T *data)
Definition: v8-internal.h:1383
void PrintFunctionCallbackInfo(void *function_callback_info)
constexpr size_t kTrustedPointerTableReservationSize
Definition: v8-internal.h:760
uint32_t ExternalPointerHandle
Definition: v8-internal.h:363
const intptr_t kSmiTagMask
Definition: v8-internal.h:88
const int kHeapObjectTagSize
Definition: v8-internal.h:74
const int kSmiMaxValue
Definition: v8-internal.h:207
constexpr bool Is64()
Definition: v8-internal.h:210
constexpr bool kAllCodeObjectsLiveInTrustedSpace
Definition: v8-internal.h:834
const int kSmiTag
Definition: v8-internal.h:86
constexpr CodePointerHandle kNullCodePointerHandle
Definition: v8-internal.h:805
Address CppHeapPointer_t
Definition: v8-internal.h:391
constexpr CppHeapPointerHandle kNullCppHeapPointerHandle
Definition: v8-internal.h:395
constexpr int kGarbageCollectionReasonMaxValue
Definition: v8-internal.h:1394
constexpr int kCodePointerTableEntrySize
Definition: v8-internal.h:819
constexpr uint32_t kCodePointerHandleMarker
Definition: v8-internal.h:814
const int kSmiMinValue
Definition: v8-internal.h:206
constexpr bool kHaveIteratorConcept
Definition: v8-internal.h:1446
constexpr int MB
Definition: v8-internal.h:56
constexpr uint64_t kExternalPointerShiftedTagMask
Definition: v8-internal.h:349
constexpr uint64_t kExternalPointerMarkBit
Definition: v8-internal.h:346
Address SandboxedPointer_t
Definition: v8-internal.h:230
const int kApiTaggedSize
Definition: v8-internal.h:189
constexpr bool PointerCompressionIsEnabled()
Definition: v8-internal.h:192
Definition: libplatform.h:15
Definition: v8-internal.h:1367
static void Perform(T *data)
typename Iterator::iterator_concept iterator_concept
Definition: v8-internal.h:1466
Definition: v8-internal.h:1461
static constexpr bool IsValidSmi(uint64_t value)
Definition: v8-internal.h:141
static constexpr bool IsValidSmi(int64_t value)
Definition: v8-internal.h:134
static constexpr bool IsValidSmi(T value)
Definition: v8-internal.h:114
static constexpr int SmiToInt(Address value)
Definition: v8-internal.h:106
static constexpr bool IsValidSmi(T value)
Definition: v8-internal.h:164
static constexpr int SmiToInt(Address value)
Definition: v8-internal.h:156
Definition: v8-internal.h:91
Definition: v8-internal.h:452
constexpr size_t Size() const
Definition: v8-internal.h:474
constexpr bool IsEmpty() const
Definition: v8-internal.h:472
const Tag last
Definition: v8-internal.h:505
constexpr bool operator==(const TagRange other) const
Definition: v8-internal.h:494
constexpr bool Contains(Tag tag) const
Definition: v8-internal.h:482
const Tag first
Definition: v8-internal.h:504
constexpr TagRange()
Definition: v8-internal.h:469
constexpr TagRange(Tag tag)
Definition: v8-internal.h:465
constexpr size_t hash_value() const
Definition: v8-internal.h:498
constexpr TagRange(Tag first, Tag last)
Definition: v8-internal.h:458
constexpr bool Contains(TagRange tag_range) const
Definition: v8-internal.h:490
#define V8_EXPORT
Definition: v8config.h:800
#define V8_INLINE
Definition: v8config.h:500
#define V8_DEPRECATE_SOON(message)
Definition: v8config.h:614
#define V8_LIKELY(condition)
Definition: v8config.h:661