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

#include <persistent-map.h>

Collaboration diagram for v8::internal::compiler::PersistentMap< Key, Value, Hasher >:

Classes

class  double_iterator
 
struct  FocusedTree
 
class  HashValue
 
class  iterator
 
struct  KeyValue
 
struct  ZipIterable
 

Public Types

using key_type = Key
 
using mapped_type = Value
 
using value_type = std::pair<Key, Value>
 

Public Member Functions

size_t last_depth () const
 
const ValueGet (const Key &key) const
 
void Set (Key key, Value value)
 
template<class F >
void Modify (Key key, F f)
 
bool operator== (const PersistentMap &other) const
 
bool operator!= (const PersistentMap &other) const
 
iterator begin () const
 
iterator end () const
 
ZipIterable Zip (const PersistentMap &other) const
 
 PersistentMap (Zone *zone, Value def_value=Value())
 

Private Types

enum  Bit : int { kLeft = 0 , kRight = 1 }
 

Private Member Functions

const FocusedTreeFindHash (HashValue hash) const
 
const FocusedTreeFindHash (HashValue hash, std::array< const FocusedTree *, kHashBits > *path, int *length) const
 
const ValueGetFocusedValue (const FocusedTree *tree, const Key &key) const
 
 PersistentMap (const FocusedTree *tree, Zone *zone, Value def_value)
 

Static Private Member Functions

static const FocusedTreeGetChild (const FocusedTree *tree, int level, Bit bit)
 
static const FocusedTreeFindLeftmost (const FocusedTree *start, int *level, std::array< const FocusedTree *, kHashBits > *path)
 

Private Attributes

const FocusedTreetree_
 
Value def_value_
 
Zonezone_
 

Static Private Attributes

static constexpr size_t kHashBits = 32
 

Friends

struct may_be_unequal< PersistentMap< Key, Value, Hasher > >
 

Detailed Description

template<class Key, class Value, class Hasher = base::hash<Key>>
class v8::internal::compiler::PersistentMap< Key, Value, Hasher >

Definition at line 43 of file persistent-map.h.

Member Typedef Documentation

◆ key_type

template<class Key , class Value , class Hasher = base::hash<Key>>
using v8::internal::compiler::PersistentMap< Key, Value, Hasher >::key_type = Key

Definition at line 45 of file persistent-map.h.

◆ mapped_type

template<class Key , class Value , class Hasher = base::hash<Key>>
using v8::internal::compiler::PersistentMap< Key, Value, Hasher >::mapped_type = Value

Definition at line 46 of file persistent-map.h.

◆ value_type

template<class Key , class Value , class Hasher = base::hash<Key>>
using v8::internal::compiler::PersistentMap< Key, Value, Hasher >::value_type = std::pair<Key, Value>

Definition at line 47 of file persistent-map.h.

Member Enumeration Documentation

◆ Bit

template<class Key , class Value , class Hasher = base::hash<Key>>
enum v8::internal::compiler::PersistentMap::Bit : int
private
Enumerator
kLeft 
kRight 

Definition at line 51 of file persistent-map.h.

Constructor & Destructor Documentation

◆ PersistentMap() [1/2]

template<class Key , class Value , class Hasher = base::hash<Key>>
v8::internal::compiler::PersistentMap< Key, Value, Hasher >::PersistentMap ( Zone * zone,
Value def_value = Value() )
inlineexplicit

Definition at line 131 of file persistent-map.h.

◆ PersistentMap() [2/2]

template<class Key , class Value , class Hasher = base::hash<Key>>
v8::internal::compiler::PersistentMap< Key, Value, Hasher >::PersistentMap ( const FocusedTree * tree,
Zone * zone,
Value def_value )
inlineprivate

Definition at line 163 of file persistent-map.h.

Member Function Documentation

◆ begin()

template<class Key , class Value , class Hasher = base::hash<Key>>
iterator v8::internal::compiler::PersistentMap< Key, Value, Hasher >::begin ( ) const
inline

Definition at line 110 of file persistent-map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end()

template<class Key , class Value , class Hasher = base::hash<Key>>
iterator v8::internal::compiler::PersistentMap< Key, Value, Hasher >::end ( ) const
inline

Definition at line 114 of file persistent-map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindHash() [1/2]

template<class Key , class Value , class Hasher >
const PersistentMap< Key, Value, Hasher >::FocusedTree * v8::internal::compiler::PersistentMap< Key, Value, Hasher >::FindHash ( HashValue hash) const
private

Definition at line 445 of file persistent-map.h.

Here is the caller graph for this function:

◆ FindHash() [2/2]

template<class Key , class Value , class Hasher >
const PersistentMap< Key, Value, Hasher >::FocusedTree * v8::internal::compiler::PersistentMap< Key, Value, Hasher >::FindHash ( HashValue hash,
std::array< const FocusedTree *, kHashBits > * path,
int * length ) const
private

Definition at line 460 of file persistent-map.h.

◆ FindLeftmost()

template<class Key , class Value , class Hasher >
const PersistentMap< Key, Value, Hasher >::FocusedTree * v8::internal::compiler::PersistentMap< Key, Value, Hasher >::FindLeftmost ( const FocusedTree * start,
int * level,
std::array< const FocusedTree *, kHashBits > * path )
staticprivate

Definition at line 521 of file persistent-map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get()

template<class Key , class Value , class Hasher = base::hash<Key>>
const Value & v8::internal::compiler::PersistentMap< Key, Value, Hasher >::Get ( const Key & key) const
inline

Definition at line 79 of file persistent-map.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetChild()

template<class Key , class Value , class Hasher >
const PersistentMap< Key, Value, Hasher >::FocusedTree * v8::internal::compiler::PersistentMap< Key, Value, Hasher >::GetChild ( const FocusedTree * tree,
int level,
Bit bit )
staticprivate

Definition at line 508 of file persistent-map.h.

◆ GetFocusedValue()

template<class Key , class Value , class Hasher >
const Value & v8::internal::compiler::PersistentMap< Key, Value, Hasher >::GetFocusedValue ( const FocusedTree * tree,
const Key & key ) const
private

Definition at line 486 of file persistent-map.h.

Here is the caller graph for this function:

◆ last_depth()

template<class Key , class Value , class Hasher = base::hash<Key>>
size_t v8::internal::compiler::PersistentMap< Key, Value, Hasher >::last_depth ( ) const
inline

Definition at line 71 of file persistent-map.h.

◆ Modify()

template<class Key , class Value , class Hasher >
template<class F >
void v8::internal::compiler::PersistentMap< Key, Value, Hasher >::Modify ( Key key,
F f )

Definition at line 407 of file persistent-map.h.

◆ operator!=()

template<class Key , class Value , class Hasher = base::hash<Key>>
bool v8::internal::compiler::PersistentMap< Key, Value, Hasher >::operator!= ( const PersistentMap< Key, Value, Hasher > & other) const
inline

Definition at line 101 of file persistent-map.h.

◆ operator==()

template<class Key , class Value , class Hasher = base::hash<Key>>
bool v8::internal::compiler::PersistentMap< Key, Value, Hasher >::operator== ( const PersistentMap< Key, Value, Hasher > & other) const
inline

Definition at line 92 of file persistent-map.h.

Here is the call graph for this function:

◆ Set()

template<class Key , class Value , class Hasher >
void v8::internal::compiler::PersistentMap< Key, Value, Hasher >::Set ( Key key,
Value value )

Definition at line 401 of file persistent-map.h.

Here is the caller graph for this function:

◆ Zip()

template<class Key , class Value , class Hasher = base::hash<Key>>
ZipIterable v8::internal::compiler::PersistentMap< Key, Value, Hasher >::Zip ( const PersistentMap< Key, Value, Hasher > & other) const
inline

Definition at line 129 of file persistent-map.h.

Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ may_be_unequal< PersistentMap< Key, Value, Hasher > >

template<class Key , class Value , class Hasher = base::hash<Key>>
friend struct may_be_unequal< PersistentMap< Key, Value, Hasher > >
friend

Definition at line 50 of file persistent-map.h.

Member Data Documentation

◆ def_value_

template<class Key , class Value , class Hasher = base::hash<Key>>
Value v8::internal::compiler::PersistentMap< Key, Value, Hasher >::def_value_
private

Definition at line 167 of file persistent-map.h.

◆ kHashBits

template<class Key , class Value , class Hasher = base::hash<Key>>
size_t v8::internal::compiler::PersistentMap< Key, Value, Hasher >::kHashBits = 32
staticconstexprprivate

Definition at line 50 of file persistent-map.h.

◆ tree_

template<class Key , class Value , class Hasher = base::hash<Key>>
const FocusedTree* v8::internal::compiler::PersistentMap< Key, Value, Hasher >::tree_
private

Definition at line 166 of file persistent-map.h.

◆ zone_

template<class Key , class Value , class Hasher = base::hash<Key>>
Zone* v8::internal::compiler::PersistentMap< Key, Value, Hasher >::zone_
private

Definition at line 168 of file persistent-map.h.


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