5#ifndef V8_OBJECTS_ORDERED_HASH_TABLE_INL_H_
6#define V8_OBJECTS_ORDERED_HASH_TABLE_INL_H_
24#include "torque-generated/src/objects/ordered-hash-table-tq-inl.inc"
26template <
class Derived,
int entrysize>
29 return k != roots.the_hole_value();
32template <
class Derived>
36template <
class Derived>
38 InternalIndex entry)
const {
40 Offset entry_offset = GetDataEntryOffset(entry.as_int(), Derived::kKeyIndex);
44template <
class Derived>
46 int entry,
int relative_index) {
48 DCHECK_LE(
static_cast<unsigned>(relative_index), Derived::kEntrySize);
49 Offset entry_offset = GetDataEntryOffset(entry, relative_index);
61 return roots.ordered_hash_set_map();
65 return roots.ordered_hash_map_map();
69 return roots.ordered_name_dictionary_map();
73 return roots.small_ordered_name_dictionary_map();
77 return roots.small_ordered_hash_map_map();
81 return roots.small_ordered_hash_set_map();
99template <
class Derived,
int entrysize>
104 if (!IsKey(roots, k))
return false;
157 return IsOrderedHashSet(*table);
161 return IsOrderedHashMap(*table);
165 return IsOrderedNameDictionary(*table);
169 return IsSmallOrderedHashSet(*table);
173 return IsSmallOrderedNameDictionary(*table);
177 return IsSmallOrderedHashMap(*table);
180template <
class Derived>
184 int entry_offset = GetDataEntryOffset(entry, relative_index);
189template <
class Derived,
class TableType>
static constexpr bool is_valid(T value)
T ReadField(size_t offset) const
void WriteField(size_t offset, T value) const
constexpr int as_int() const
static Handle< Map > GetMap(RootsTable &roots)
Tagged< Object > ValueAt(InternalIndex entry)
static bool Is(DirectHandle< HeapObject > table)
static const int kValueOffset
static bool Is(DirectHandle< HeapObject > table)
Tagged< Object > CurrentKey()
Tagged< Object > KeyAt(InternalIndex entry)
bool ToKey(ReadOnlyRoots roots, InternalIndex entry, Tagged< Object > *out_key)
static bool IsKey(ReadOnlyRoots roots, Tagged< Object > k)
int EntryToIndex(InternalIndex entry)
Tagged< Object > ValueAt(InternalIndex entry)
void DetailsAtPut(InternalIndex entry, PropertyDetails value)
static Handle< Map > GetMap(RootsTable &roots)
void ValueAtPut(InternalIndex entry, Tagged< Object > value)
static const int kPropertyDetailsOffset
PropertyDetails DetailsAt(InternalIndex entry)
Tagged< Name > NameAt(InternalIndex entry)
static bool Is(DirectHandle< HeapObject > table)
static const int kValueOffset
static constexpr int HashIndex()
static DirectHandle< Map > GetMap(RootsTable &roots)
static bool Is(DirectHandle< HeapObject > table)
static DirectHandle< Map > GetMap(RootsTable &roots)
static bool Is(DirectHandle< HeapObject > table)
V8_INLINE Tagged< Object > GetDataEntry(int entry, int relative_index)
V8_INLINE Tagged< Object > KeyAt(InternalIndex entry) const
static constexpr Offset PrefixOffset()
void SetDataEntry(int entry, int relative_index, Tagged< Object > value)
static const int kValueIndex
static bool Is(DirectHandle< HeapObject > table)
PropertyDetails DetailsAt(InternalIndex entry)
void DetailsAtPut(InternalIndex entry, PropertyDetails value)
Tagged< Object > ValueAt(InternalIndex entry)
static const int kPropertyDetailsIndex
void ValueAtPut(InternalIndex entry, Tagged< Object > value)
static DirectHandle< Map > GetMap(RootsTable &roots)
static constexpr int ToInt(const Tagged< Object > object)
static constexpr Tagged< Smi > FromInt(int value)
void set(int index, Tagged< ElementT > value, WriteBarrierMode mode=kDefaultMode)
Tagged< ElementT > get(int index) const
static PtrType load(Tagged< HeapObject > host, int offset=0)
constexpr AddrMode Offset
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define OBJECT_CONSTRUCTORS_IMPL(Type, Super)
#define WRITE_BARRIER(object, offset, value)
#define RELAXED_WRITE_FIELD(p, offset, value)
#define DCHECK_LE(v1, v2)
#define DCHECK_NE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)