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

#include <wasm-module.h>

Collaboration diagram for v8::internal::wasm::AdaptiveMap< Value >:

Public Member Functions

 AdaptiveMap ()
 
 AdaptiveMap (const AdaptiveMap &)=delete
 
AdaptiveMapoperator= (const AdaptiveMap &)=delete
 
 AdaptiveMap (AdaptiveMap &&other) V8_NOEXCEPT
 
AdaptiveMapoperator= (AdaptiveMap &&other) V8_NOEXCEPT
 
void FinishInitialization ()
 
bool is_set () const
 
void Put (uint32_t key, const Value &value)
 
void Put (uint32_t key, Value &&value)
 
const ValueGet (uint32_t key) const
 
bool Has (uint32_t key) const
 
size_t EstimateCurrentMemoryConsumption () const
 

Static Public Attributes

static constexpr uint32_t kMaxKey = 10'000'000
 

Private Types

enum  Mode { kDense , kSparse , kInitializing }
 
using MapType = std::map<uint32_t, Value>
 

Private Attributes

Mode mode_ {kInitializing}
 
std::vector< Valuevector_
 
std::unique_ptr< MapTypemap_
 

Static Private Attributes

static constexpr uint32_t kLoadFactor = 4
 

Detailed Description

template<class Value>
class v8::internal::wasm::AdaptiveMap< Value >

Definition at line 325 of file wasm-module.h.

Member Typedef Documentation

◆ MapType

template<class Value >
using v8::internal::wasm::AdaptiveMap< Value >::MapType = std::map<uint32_t, Value>
private

Definition at line 389 of file wasm-module.h.

Member Enumeration Documentation

◆ Mode

template<class Value >
enum v8::internal::wasm::AdaptiveMap::Mode
private
Enumerator
kDense 
kSparse 
kInitializing 

Definition at line 390 of file wasm-module.h.

Constructor & Destructor Documentation

◆ AdaptiveMap() [1/3]

template<class Value >
v8::internal::wasm::AdaptiveMap< Value >::AdaptiveMap ( )
inline

Definition at line 333 of file wasm-module.h.

◆ AdaptiveMap() [2/3]

template<class Value >
v8::internal::wasm::AdaptiveMap< Value >::AdaptiveMap ( const AdaptiveMap< Value > & )
explicitdelete

◆ AdaptiveMap() [3/3]

template<class Value >
v8::internal::wasm::AdaptiveMap< Value >::AdaptiveMap ( AdaptiveMap< Value > && other)
inline

Definition at line 338 of file wasm-module.h.

Member Function Documentation

◆ EstimateCurrentMemoryConsumption()

template<class Value >
size_t v8::internal::wasm::AdaptiveMap< Value >::EstimateCurrentMemoryConsumption ( ) const

Definition at line 715 of file wasm-module.cc.

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

◆ FinishInitialization()

template<class Value >
void v8::internal::wasm::AdaptiveMap< Value >::FinishInitialization ( )

Definition at line 34 of file wasm-module.cc.

◆ Get()

template<class Value >
const Value * v8::internal::wasm::AdaptiveMap< Value >::Get ( uint32_t key) const
inline

Definition at line 363 of file wasm-module.h.

Here is the caller graph for this function:

◆ Has()

template<class Value >
bool v8::internal::wasm::AdaptiveMap< Value >::Has ( uint32_t key) const
inline

Definition at line 376 of file wasm-module.h.

◆ is_set()

template<class Value >
bool v8::internal::wasm::AdaptiveMap< Value >::is_set ( ) const
inline

Definition at line 349 of file wasm-module.h.

◆ operator=() [1/2]

template<class Value >
AdaptiveMap & v8::internal::wasm::AdaptiveMap< Value >::operator= ( AdaptiveMap< Value > && other)
inline

Definition at line 340 of file wasm-module.h.

◆ operator=() [2/2]

template<class Value >
AdaptiveMap & v8::internal::wasm::AdaptiveMap< Value >::operator= ( const AdaptiveMap< Value > & )
delete

◆ Put() [1/2]

template<class Value >
void v8::internal::wasm::AdaptiveMap< Value >::Put ( uint32_t key,
const Value & value )
inline

Definition at line 351 of file wasm-module.h.

Here is the caller graph for this function:

◆ Put() [2/2]

template<class Value >
void v8::internal::wasm::AdaptiveMap< Value >::Put ( uint32_t key,
Value && value )
inline

Definition at line 357 of file wasm-module.h.

Member Data Documentation

◆ kLoadFactor

template<class Value >
uint32_t v8::internal::wasm::AdaptiveMap< Value >::kLoadFactor = 4
staticconstexprprivate

Definition at line 388 of file wasm-module.h.

◆ kMaxKey

template<class Value >
uint32_t v8::internal::wasm::AdaptiveMap< Value >::kMaxKey = 10'000'000
staticconstexpr

Definition at line 330 of file wasm-module.h.

◆ map_

template<class Value >
std::unique_ptr<MapType> v8::internal::wasm::AdaptiveMap< Value >::map_
private

Definition at line 394 of file wasm-module.h.

◆ mode_

template<class Value >
Mode v8::internal::wasm::AdaptiveMap< Value >::mode_ {kInitializing}
private

Definition at line 392 of file wasm-module.h.

◆ vector_

template<class Value >
std::vector<Value> v8::internal::wasm::AdaptiveMap< Value >::vector_
private

Definition at line 393 of file wasm-module.h.


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