5#ifndef V8_UTILS_ADDRESS_MAP_H_
6#define V8_UTILS_ADDRESS_MAP_H_
16template <
typename Type>
19 base::KeyEqualityMatcher<intptr_t>,
20 base::DefaultAllocationPolicy> {
24 inline void Set(
Type value, uint32_t index) {
25 uintptr_t
key =
Key(value);
30 uintptr_t
key =
Key(value);
39 static uint32_t
Hash(uintptr_t
key) {
return static_cast<uint32_t
>(
key); }
44 return static_cast<uintptr_t
>(
value);
67 if (maybe_index.
IsJust()) {
V8_INLINE bool IsJust() const
V8_INLINE T FromJust() const &
Entry * LookupOrInsert(const uintptr_t &key, uint32_t hash)
Entry * Lookup(const uintptr_t &key, uint32_t hash) const
static uintptr_t Key(Type value)
void Set(Type value, uint32_t index)
Maybe< uint32_t > Get(Type value) const
static uint32_t Hash(uintptr_t key)
V8_EXPORT_PRIVATE bool Lookup(Tagged< HeapObject > obj, RootIndex *out_root_list) const
RootIndexMap & operator=(const RootIndexMap &)=delete
RootIndexMap(const RootIndexMap &)=delete
RootIndexMap(Isolate *isolate)
HeapObjectToIndexHashMap * map_
Maybe< T > Just(const T &t)
#define V8_EXPORT_PRIVATE