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

#include <hashmap.h>

Collaboration diagram for v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >:

Classes

struct  Impl
 

Public Types

using Entry = TemplateHashMapEntry<Key, Value>
 

Public Member Functions

 TemplateHashMapImpl (uint32_t capacity=kDefaultHashMapCapacity, MatchFun match=MatchFun(), AllocationPolicy allocator=AllocationPolicy())
 
 TemplateHashMapImpl (const TemplateHashMapImpl &)=delete
 
TemplateHashMapImploperator= (const TemplateHashMapImpl &)=delete
 
 TemplateHashMapImpl (const TemplateHashMapImpl *original, AllocationPolicy allocator=AllocationPolicy())
 
 TemplateHashMapImpl (TemplateHashMapImpl &&other) V8_NOEXCEPT=default
 
 ~TemplateHashMapImpl ()
 
TemplateHashMapImploperator= (TemplateHashMapImpl &&other) V8_NOEXCEPT=default
 
EntryLookup (const Key &key, uint32_t hash) const
 
EntryLookupOrInsert (const Key &key, uint32_t hash)
 
template<typename Func >
EntryLookupOrInsert (const Key &key, uint32_t hash, const Func &value_func)
 
template<typename LookupKey , typename KeyFunc , typename ValueFunc >
EntryLookupOrInsert (const LookupKey &lookup_key, uint32_t hash, const KeyFunc &key_func, const ValueFunc &value_func)
 
EntryInsertNew (const Key &key, uint32_t hash)
 
Value Remove (const Key &key, uint32_t hash)
 
void Clear ()
 
void Invalidate ()
 
uint32_t occupancy () const
 
uint32_t capacity () const
 
EntryStart () const
 
EntryNext (Entry *entry) const
 
AllocationPolicy allocator () const
 

Static Public Attributes

static const uint32_t kDefaultHashMapCapacity = 8
 

Protected Member Functions

void Initialize (uint32_t capacity)
 

Private Member Functions

Entrymap_end () const
 
template<typename LookupKey >
EntryProbe (const LookupKey &key, uint32_t hash) const
 
EntryFillEmptyEntry (Entry *entry, const Key &key, const Value &value, uint32_t hash)
 
void Resize ()
 

Private Attributes

v8::base::TemplateHashMapImpl::Impl impl_
 

Detailed Description

template<typename Key, typename Value, class MatchFun, class AllocationPolicy>
class v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >

Definition at line 35 of file hashmap.h.

Member Typedef Documentation

◆ Entry

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
using v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry = TemplateHashMapEntry<Key, Value>

Definition at line 37 of file hashmap.h.

Constructor & Destructor Documentation

◆ TemplateHashMapImpl() [1/4]

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::TemplateHashMapImpl ( uint32_t capacity = kDefaultHashMapCapacity,
MatchFun match = MatchFun(),
AllocationPolicy allocator = AllocationPolicy() )
explicit

Definition at line 185 of file hashmap.h.

Here is the call graph for this function:

◆ TemplateHashMapImpl() [2/4]

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::TemplateHashMapImpl ( const TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy > & )
delete

◆ TemplateHashMapImpl() [3/4]

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::TemplateHashMapImpl ( const TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy > * original,
AllocationPolicy allocator = AllocationPolicy() )
explicit

Definition at line 194 of file hashmap.h.

Here is the call graph for this function:

◆ TemplateHashMapImpl() [4/4]

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::TemplateHashMapImpl ( TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy > && other)
default

◆ ~TemplateHashMapImpl()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::~TemplateHashMapImpl ( )

Definition at line 207 of file hashmap.h.

Member Function Documentation

◆ allocator()

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
AllocationPolicy v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::allocator ( ) const
inline

Definition at line 129 of file hashmap.h.

Here is the call graph for this function:

◆ capacity()

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
uint32_t v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::capacity ( ) const
inline

Definition at line 116 of file hashmap.h.

Here is the caller graph for this function:

◆ Clear()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
void v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Clear ( )

Definition at line 327 of file hashmap.h.

Here is the caller graph for this function:

◆ FillEmptyEntry()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::FillEmptyEntry ( Entry * entry,
const Key & key,
const Value & value,
uint32_t hash )
private

Definition at line 380 of file hashmap.h.

Here is the call graph for this function:

◆ Initialize()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
void v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Initialize ( uint32_t capacity)
protected

Definition at line 398 of file hashmap.h.

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

◆ InsertNew()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::InsertNew ( const Key & key,
uint32_t hash )

Definition at line 257 of file hashmap.h.

◆ Invalidate()

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
void v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Invalidate ( )
inline

Definition at line 104 of file hashmap.h.

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

◆ Lookup()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Lookup ( const Key & key,
uint32_t hash ) const

Definition at line 214 of file hashmap.h.

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

◆ LookupOrInsert() [1/3]

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::LookupOrInsert ( const Key & key,
uint32_t hash )

Definition at line 223 of file hashmap.h.

Here is the caller graph for this function:

◆ LookupOrInsert() [2/3]

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
template<typename Func >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::LookupOrInsert ( const Key & key,
uint32_t hash,
const Func & value_func )

Definition at line 232 of file hashmap.h.

◆ LookupOrInsert() [3/3]

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
template<typename LookupKey , typename KeyFunc , typename ValueFunc >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::LookupOrInsert ( const LookupKey & lookup_key,
uint32_t hash,
const KeyFunc & key_func,
const ValueFunc & value_func )

Definition at line 242 of file hashmap.h.

Here is the call graph for this function:

◆ map_end()

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::map_end ( ) const
inlineprivate

Definition at line 135 of file hashmap.h.

◆ Next()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Next ( Entry * entry) const

Definition at line 345 of file hashmap.h.

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

◆ occupancy()

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
uint32_t v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::occupancy ( ) const
inline

Definition at line 111 of file hashmap.h.

Here is the caller graph for this function:

◆ operator=() [1/2]

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
TemplateHashMapImpl & v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::operator= ( const TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy > & )
delete

◆ operator=() [2/2]

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
TemplateHashMapImpl & v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::operator= ( TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy > && other)
default

◆ Probe()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
template<typename LookupKey >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Probe ( const LookupKey & key,
uint32_t hash ) const
private

Definition at line 361 of file hashmap.h.

Here is the call graph for this function:

◆ Remove()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
Value v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Remove ( const Key & key,
uint32_t hash )

Definition at line 265 of file hashmap.h.

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

◆ Resize()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
void v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Resize ( )
private

Definition at line 412 of file hashmap.h.

◆ Start()

template<typename Key , typename Value , typename MatchFun , class AllocationPolicy >
TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Entry * v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::Start ( ) const

Definition at line 338 of file hashmap.h.

Here is the caller graph for this function:

Member Data Documentation

◆ impl_

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
v8::base::TemplateHashMapImpl::Impl v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::impl_
private

◆ kDefaultHashMapCapacity

template<typename Key , typename Value , class MatchFun , class AllocationPolicy >
const uint32_t v8::base::TemplateHashMapImpl< Key, Value, MatchFun, AllocationPolicy >::kDefaultHashMapCapacity = 8
static

Definition at line 42 of file hashmap.h.


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