v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value > Class Template Reference

#include <layered-hash-map.h>

Collaboration diagram for v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >:

Classes

struct  Entry
 

Public Member Functions

 LayeredHashMap (Zone *zone, uint32_t initial_capacity=64)
 
void StartLayer ()
 
void DropLastLayer ()
 
void InsertNewKey (Key key, Value value)
 
bool Contains (Key key)
 
std::optional< ValueGet (Key key)
 

Private Member Functions

void ResizeIfNeeded ()
 
size_t NextEntryIndex (size_t index)
 
EntryFindEntryForKey (Key key, size_t hash=0)
 
EntryInsertEntry (Entry entry)
 
size_t ComputeHash (Key key)
 

Private Attributes

size_t mask_
 
size_t entry_count_
 
base::Vector< Entrytable_
 
ZoneVector< Entry * > depths_heads_
 
Zonezone_
 

Static Private Attributes

static constexpr double kNeedResizePercentage = 0.75
 
static constexpr int kGrowthFactor = 2
 

Detailed Description

template<class Key, class Value>
class v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >

Definition at line 39 of file layered-hash-map.h.

Constructor & Destructor Documentation

◆ LayeredHashMap()

template<class Key , class Value >
v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::LayeredHashMap ( Zone * zone,
uint32_t initial_capacity = 64 )
explicit

Definition at line 78 of file layered-hash-map.h.

Here is the call graph for this function:

Member Function Documentation

◆ ComputeHash()

template<class Key , class Value >
size_t v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::ComputeHash ( Key key)
inlineprivate

Definition at line 62 of file layered-hash-map.h.

◆ Contains()

template<class Key , class Value >
bool v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::Contains ( Key key)

Definition at line 136 of file layered-hash-map.h.

Here is the call graph for this function:

◆ DropLastLayer()

template<class Key , class Value >
void v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::DropLastLayer ( )

Definition at line 97 of file layered-hash-map.h.

◆ FindEntryForKey()

template<class Key , class Value >
LayeredHashMap< Key, Value >::Entry * v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::FindEntryForKey ( Key key,
size_t hash = 0 )
private

Definition at line 110 of file layered-hash-map.h.

◆ Get()

template<class Key , class Value >
std::optional< Value > v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::Get ( Key key)

Definition at line 129 of file layered-hash-map.h.

◆ InsertEntry()

template<class Key , class Value >
Entry * v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::InsertEntry ( Entry entry)
private

◆ InsertNewKey()

template<class Key , class Value >
void v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::InsertNewKey ( Key key,
Value value )

Definition at line 118 of file layered-hash-map.h.

◆ NextEntryIndex()

template<class Key , class Value >
size_t v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::NextEntryIndex ( size_t index)
inlineprivate

Definition at line 58 of file layered-hash-map.h.

◆ ResizeIfNeeded()

template<class Key , class Value >
void v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::ResizeIfNeeded ( )
private

Definition at line 141 of file layered-hash-map.h.

Here is the call graph for this function:

◆ StartLayer()

template<class Key , class Value >
void v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::StartLayer ( )

Definition at line 92 of file layered-hash-map.h.

Member Data Documentation

◆ depths_heads_

template<class Key , class Value >
ZoneVector<Entry*> v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::depths_heads_
private

Definition at line 70 of file layered-hash-map.h.

◆ entry_count_

template<class Key , class Value >
size_t v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::entry_count_
private

Definition at line 68 of file layered-hash-map.h.

◆ kGrowthFactor

template<class Key , class Value >
int v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::kGrowthFactor = 2
staticconstexprprivate

Definition at line 74 of file layered-hash-map.h.

◆ kNeedResizePercentage

template<class Key , class Value >
double v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::kNeedResizePercentage = 0.75
staticconstexprprivate

Definition at line 73 of file layered-hash-map.h.

◆ mask_

template<class Key , class Value >
size_t v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::mask_
private

Definition at line 67 of file layered-hash-map.h.

◆ table_

template<class Key , class Value >
base::Vector<Entry> v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::table_
private

Definition at line 69 of file layered-hash-map.h.

◆ zone_

template<class Key , class Value >
Zone* v8::internal::compiler::turboshaft::LayeredHashMap< Key, Value >::zone_
private

Definition at line 71 of file layered-hash-map.h.


The documentation for this class was generated from the following file: