5#ifndef V8_COMPILER_TURBOSHAFT_SIDETABLE_H_
6#define V8_COMPILER_TURBOSHAFT_SIDETABLE_H_
26template <
class T,
class Key>
29 static_assert(std::is_same_v<Key, OpIndex> ||
30 std::is_same_v<Key, BlockIndex>);
34 size_t i = index.
id();
46 size_t i = index.
id();
69 :
table_(size, initial_value, zone) {}
73 size_t NextSize(
size_t out_of_bounds_index)
const {
75 return out_of_bounds_index + out_of_bounds_index / 2 + 32;
81template <
class T,
class Key>
84 static_assert(std::is_same_v<Key, OpIndex> ||
85 std::is_same_v<Key, BlockIndex>);
102 :
table_(size, default_value, zone) {}
117 :
Base(size, initial_value, zone) {}
128 :
Base(size, initial_value, zone) {}
148 :
Base(size, initial_value, zone)
192 :
Base(size, default_value, zone)
240 return data_.at(index);
245 if (
auto it =
data_.find(index); it !=
data_.end()) {
246 if (value) *value = &it->second;
254 auto it =
data_.find(index);
FixedBlockSidetable(size_t size, const T &initial_value, Zone *zone)
FixedBlockSidetable(size_t size, Zone *zone)
FixedOpIndexSidetable(size_t size, const T &default_value, Zone *zone, const Graph *graph)
FixedOpIndexSidetable(size_t size, Zone *zone, const Graph *graph)
T & operator[](OpIndex index)
const T & operator[](OpIndex index) const
void SwapData(FixedOpIndexSidetable< T > &other)
GrowingBlockSidetable(size_t size, const T &initial_value, Zone *zone)
GrowingBlockSidetable(Zone *zone)
void SwapData(GrowingOpIndexSidetable< T > &other)
GrowingOpIndexSidetable(Zone *zone, const Graph *graph)
T & operator[](OpIndex index)
GrowingOpIndexSidetable(size_t size, const T &initial_value, Zone *zone, const Graph *graph)
const T & operator[](OpIndex index) const
T & operator[](OpIndex index)
void remove(OpIndex index)
const T & operator[](OpIndex index) const
ZoneAbslFlatHashMap< OpIndex, T > data_
bool contains(OpIndex index, const T **value=nullptr) const
SparseOpIndexSideTable(Zone *zone, const Graph *graph)
const T & operator[](Key op) const
FixedSidetable(size_t size, const T &default_value, Zone *zone)
FixedSidetable(size_t size, Zone *zone)
GrowingSidetable(size_t size, const T &initial_value, Zone *zone)
T & operator[](Key index)
const T & operator[](Key index) const
size_t NextSize(size_t out_of_bounds_index) const
GrowingSidetable(Zone *zone)
#define DCHECK_GE(v1, v2)
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define V8_EXPORT_PRIVATE
#define V8_UNLIKELY(condition)