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

#include <off-heap-hash-table.h>

Collaboration diagram for v8::internal::OffHeapHashTableBase< Derived >:

Public Member Functions

int capacity () const
 
int number_of_elements () const
 
int number_of_deleted_elements () const
 
OffHeapObjectSlot slot (InternalIndex index, int offset=0) const
 
template<typename... Args>
void AddAt (PtrComprCageBase cage_base, InternalIndex entry, Args &&... args)
 
template<typename... Args>
void OverwriteDeletedAt (PtrComprCageBase cage_base, InternalIndex entry, Args &&... args)
 
void ElementsRemoved (int count)
 
size_t GetSizeExcludingHeader () const
 
template<typename IsolateT , typename FindKey >
InternalIndex FindEntry (IsolateT *isolate, FindKey key, uint32_t hash) const
 
InternalIndex FindInsertionEntry (PtrComprCageBase cage_base, uint32_t hash) const
 
template<typename IsolateT , typename FindKey >
InternalIndex FindEntryOrInsertionEntry (IsolateT *isolate, FindKey key, uint32_t hash) const
 
bool ShouldResizeToAdd (int number_of_additional_elements, int *new_capacity)
 
void RehashInto (PtrComprCageBase cage_base, Derived *new_table)
 
void IterateElements (Root root, RootVisitor *visitor)
 

Static Public Member Functions

static constexpr Tagged< Smiempty_element ()
 
static constexpr Tagged< Smideleted_element ()
 
static bool IsKey (Tagged< Object > k)
 

Protected Member Functions

 OffHeapHashTableBase (int capacity)
 
bool HasSufficientCapacityToAdd (int number_of_additional_elements) const
 

Static Protected Member Functions

static InternalIndex FirstProbe (uint32_t hash, uint32_t size)
 
static InternalIndex NextProbe (InternalIndex last, uint32_t number, uint32_t size)
 
static bool HasSufficientCapacityToAdd (int capacity, int number_of_elements, int number_of_deleted_elements, int number_of_additional_elements)
 
static int ComputeCapacity (int at_least_space_for)
 
static int ComputeCapacityWithShrink (int current_capacity, int at_least_space_for)
 
static size_t GetSizeExcludingHeader (int capacity)
 
template<typename Container , size_t OffsetOfElementsInContainer>
static void * Allocate (int capacity)
 
static void Free (void *container)
 

Protected Attributes

int number_of_elements_
 
int number_of_deleted_elements_
 
const int capacity_
 
Tagged_t elements_ [1]
 

Detailed Description

template<typename Derived>
class v8::internal::OffHeapHashTableBase< Derived >

Definition at line 68 of file off-heap-hash-table.h.

Constructor & Destructor Documentation

◆ OffHeapHashTableBase()

template<typename Derived >
v8::internal::OffHeapHashTableBase< Derived >::OffHeapHashTableBase ( int capacity)
explicitprotected

Definition at line 17 of file off-heap-hash-table-inl.h.

Here is the call graph for this function:

Member Function Documentation

◆ AddAt()

template<typename Derived >
template<typename... Args>
void v8::internal::OffHeapHashTableBase< Derived >::AddAt ( PtrComprCageBase cage_base,
InternalIndex entry,
Args &&... args )
inline

Definition at line 88 of file off-heap-hash-table.h.

Here is the call graph for this function:

◆ Allocate()

template<typename Derived >
template<typename Container , size_t OffsetOfElementsInContainer>
void * v8::internal::OffHeapHashTableBase< Derived >::Allocate ( int capacity)
inlinestaticprotected

Definition at line 191 of file off-heap-hash-table-inl.h.

Here is the call graph for this function:

◆ capacity()

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::capacity ( ) const
inline

Definition at line 77 of file off-heap-hash-table.h.

Here is the caller graph for this function:

◆ ComputeCapacity()

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::ComputeCapacity ( int at_least_space_for)
inlinestaticprotected

Definition at line 89 of file off-heap-hash-table-inl.h.

Here is the call graph for this function:

◆ ComputeCapacityWithShrink()

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::ComputeCapacityWithShrink ( int current_capacity,
int at_least_space_for )
inlinestaticprotected

Definition at line 99 of file off-heap-hash-table-inl.h.

◆ deleted_element()

template<typename Derived >
static constexpr Tagged< Smi > v8::internal::OffHeapHashTableBase< Derived >::deleted_element ( )
inlinestaticconstexpr

Definition at line 71 of file off-heap-hash-table.h.

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

◆ ElementsRemoved()

template<typename Derived >
void v8::internal::OffHeapHashTableBase< Derived >::ElementsRemoved ( int count)
inline

Definition at line 114 of file off-heap-hash-table.h.

◆ empty_element()

template<typename Derived >
static constexpr Tagged< Smi > v8::internal::OffHeapHashTableBase< Derived >::empty_element ( )
inlinestaticconstexpr

Definition at line 70 of file off-heap-hash-table.h.

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

◆ FindEntry()

template<typename Derived >
template<typename IsolateT , typename FindKey >
InternalIndex v8::internal::OffHeapHashTableBase< Derived >::FindEntry ( IsolateT * isolate,
FindKey key,
uint32_t hash ) const
inline

Definition at line 125 of file off-heap-hash-table-inl.h.

Here is the caller graph for this function:

◆ FindEntryOrInsertionEntry()

template<typename Derived >
template<typename IsolateT , typename FindKey >
InternalIndex v8::internal::OffHeapHashTableBase< Derived >::FindEntryOrInsertionEntry ( IsolateT * isolate,
FindKey key,
uint32_t hash ) const
inline

Definition at line 159 of file off-heap-hash-table-inl.h.

◆ FindInsertionEntry()

template<typename Derived >
InternalIndex v8::internal::OffHeapHashTableBase< Derived >::FindInsertionEntry ( PtrComprCageBase cage_base,
uint32_t hash ) const
inline

Definition at line 142 of file off-heap-hash-table-inl.h.

◆ FirstProbe()

template<typename Derived >
static InternalIndex v8::internal::OffHeapHashTableBase< Derived >::FirstProbe ( uint32_t hash,
uint32_t size )
inlinestaticprotected

Definition at line 146 of file off-heap-hash-table.h.

◆ Free()

template<typename Derived >
void v8::internal::OffHeapHashTableBase< Derived >::Free ( void * container)
inlinestaticprotected

Definition at line 207 of file off-heap-hash-table-inl.h.

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

◆ GetSizeExcludingHeader() [1/2]

template<typename Derived >
size_t v8::internal::OffHeapHashTableBase< Derived >::GetSizeExcludingHeader ( ) const
inline

Definition at line 120 of file off-heap-hash-table.h.

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

◆ GetSizeExcludingHeader() [2/2]

template<typename Derived >
static size_t v8::internal::OffHeapHashTableBase< Derived >::GetSizeExcludingHeader ( int capacity)
inlinestaticprotected

Definition at line 167 of file off-heap-hash-table.h.

◆ HasSufficientCapacityToAdd() [1/2]

template<typename Derived >
bool v8::internal::OffHeapHashTableBase< Derived >::HasSufficientCapacityToAdd ( int capacity,
int number_of_elements,
int number_of_deleted_elements,
int number_of_additional_elements )
inlinestaticprotected

Definition at line 72 of file off-heap-hash-table-inl.h.

◆ HasSufficientCapacityToAdd() [2/2]

template<typename Derived >
bool v8::internal::OffHeapHashTableBase< Derived >::HasSufficientCapacityToAdd ( int number_of_additional_elements) const
inlineprotected

Definition at line 155 of file off-heap-hash-table.h.

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

◆ IsKey()

template<typename Derived >
static bool v8::internal::OffHeapHashTableBase< Derived >::IsKey ( Tagged< Object > k)
inlinestatic

Definition at line 73 of file off-heap-hash-table.h.

Here is the call graph for this function:

◆ IterateElements()

template<typename Derived >
void v8::internal::OffHeapHashTableBase< Derived >::IterateElements ( Root root,
RootVisitor * visitor )
inline

Definition at line 116 of file off-heap-hash-table-inl.h.

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

◆ NextProbe()

template<typename Derived >
static InternalIndex v8::internal::OffHeapHashTableBase< Derived >::NextProbe ( InternalIndex last,
uint32_t number,
uint32_t size )
inlinestaticprotected

Definition at line 150 of file off-heap-hash-table.h.

◆ number_of_deleted_elements()

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::number_of_deleted_elements ( ) const
inline

Definition at line 79 of file off-heap-hash-table.h.

Here is the caller graph for this function:

◆ number_of_elements()

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::number_of_elements ( ) const
inline

Definition at line 78 of file off-heap-hash-table.h.

Here is the caller graph for this function:

◆ OverwriteDeletedAt()

template<typename Derived >
template<typename... Args>
void v8::internal::OffHeapHashTableBase< Derived >::OverwriteDeletedAt ( PtrComprCageBase cage_base,
InternalIndex entry,
Args &&... args )
inline

Definition at line 100 of file off-heap-hash-table.h.

Here is the call graph for this function:

◆ RehashInto()

template<typename Derived >
void v8::internal::OffHeapHashTableBase< Derived >::RehashInto ( PtrComprCageBase cage_base,
Derived * new_table )
inline

Definition at line 26 of file off-heap-hash-table-inl.h.

◆ ShouldResizeToAdd()

template<typename Derived >
bool v8::internal::OffHeapHashTableBase< Derived >::ShouldResizeToAdd ( int number_of_additional_elements,
int * new_capacity )
inline

Definition at line 47 of file off-heap-hash-table-inl.h.

◆ slot()

template<typename Derived >
OffHeapObjectSlot v8::internal::OffHeapHashTableBase< Derived >::slot ( InternalIndex index,
int offset = 0 ) const
inline

Definition at line 81 of file off-heap-hash-table.h.

Here is the caller graph for this function:

Member Data Documentation

◆ capacity_

template<typename Derived >
const int v8::internal::OffHeapHashTableBase< Derived >::capacity_
protected

Definition at line 184 of file off-heap-hash-table.h.

◆ elements_

template<typename Derived >
Tagged_t v8::internal::OffHeapHashTableBase< Derived >::elements_[1]
protected

Definition at line 185 of file off-heap-hash-table.h.

◆ number_of_deleted_elements_

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::number_of_deleted_elements_
protected

Definition at line 183 of file off-heap-hash-table.h.

◆ number_of_elements_

template<typename Derived >
int v8::internal::OffHeapHashTableBase< Derived >::number_of_elements_
protected

Definition at line 182 of file off-heap-hash-table.h.


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