19static_assert(
static_cast<int>(RootIndex::kUndefinedValue) ==
21static_assert(
static_cast<int>(RootIndex::kTheHoleValue) ==
23static_assert(
static_cast<int>(RootIndex::kNullValue) ==
25static_assert(
static_cast<int>(RootIndex::kTrueValue) ==
27static_assert(
static_cast<int>(RootIndex::kFalseValue) ==
29static_assert(
static_cast<int>(RootIndex::kempty_string) ==
33#define ROOT_NAME(type, name, CamelName) #name,
58 visitor->
Synchronize(VisitorSynchronization::kReadOnlyRootList);
62void ReadOnlyRoots::VerifyNameForProtectors() {
74 CHECK_EQ(computed_address, current.address());
81#define ROOT_TYPE_CHECK(Type, name, CamelName) \
82 bool CheckType_##name(Tagged<Type> value) { \
87 if (std::is_same_v<Type, Undefined>) { \
88 return Cast<Oddball>(Tagged<Object>(value))->kind() == \
89 Oddball::kUndefined; \
90 } else if (std::is_same_v<Type, Null>) { \
91 return Cast<Oddball>(Tagged<Object>(value))->kind() == Oddball::kNull; \
92 } else if (std::is_same_v<Type, True>) { \
93 return Cast<Oddball>(Tagged<Object>(value))->kind() == Oddball::kTrue; \
94 } else if (std::is_same_v<Type, False>) { \
95 return Cast<Oddball>(Tagged<Object>(value))->kind() == Oddball::kFalse; \
97 return Is##Type(value); \
102#undef ROOT_TYPE_CHECK
105void ReadOnlyRoots::VerifyTypes() {
107#define ROOT_TYPE_CHECK(Type, name, CamelName) CHECK(CheckType_##name(name()));
110#undef ROOT_TYPE_CHECK
117#if V8_STATIC_ROOTS_BOOL
119 for (
auto element : StaticReadOnlyRootsPointerTable) {
static const int kEmptyStringRootIndex
static const int kUndefinedValueRootIndex
static const int kFalseValueRootIndex
static const int kTrueValueRootIndex
static const int kNullValueRootIndex
static const int kTheHoleValueRootIndex
static MapWord FromMap(const Tagged< Map > map)
V8_INLINE Tagged< Object > object_at(RootIndex root_index) const
void InitFromStaticRootsTable(Address cage_base)
MapWord one_pointer_filler_map_word()
Address * read_only_roots_
void Iterate(RootVisitor *visitor)
static constexpr size_t kEntriesCount
V8_INLINE bool IsNameForProtector(Tagged< HeapObject > object) const
V8_INLINE bool is_initialized(RootIndex root_index) const
virtual void VisitRootPointers(Root root, const char *description, FullObjectSlot start, FullObjectSlot end)=0
virtual void Synchronize(VisitorSynchronization::SyncTag tag)
static const char * root_names_[kEntriesCount]
static constexpr size_t kEntriesCount
IndirectHandle< HeapNumber > FindHeapNumber(double value)
static V8_INLINE Address DecompressTagged(TOnHeapAddress on_heap_addr, Tagged_t raw_value)
#define ALIGN_TO_ALLOCATION_ALIGNMENT(value)
V8_INLINE Dest bit_cast(Source const &source)
PerThreadAssertScopeDebugOnly< false, SAFEPOINTS_ASSERT, HEAP_ALLOCATION_ASSERT > DisallowGarbageCollection
Handle< T > IndirectHandle
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define ROOT_NAME(type, name, CamelName)
#define READ_ONLY_ROOT_LIST(V)
#define CHECK_LT(lhs, rhs)
#define CHECK_EQ(lhs, rhs)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
#define V8_STATIC_ROOTS_BOOL