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

#include <wasm-engine.h>

Collaboration diagram for v8::internal::wasm::NativeModuleCache:

Classes

struct  Key
 

Public Member Functions

std::shared_ptr< NativeModuleMaybeGetNativeModule (ModuleOrigin origin, base::Vector< const uint8_t > wire_bytes, const CompileTimeImports &compile_imports)
 
bool GetStreamingCompilationOwnership (size_t prefix_hash, const CompileTimeImports &compile_imports)
 
void StreamingCompilationFailed (size_t prefix_hash, const CompileTimeImports &compile_imports)
 
std::shared_ptr< NativeModuleUpdate (std::shared_ptr< NativeModule > native_module, bool error)
 
void Erase (NativeModule *native_module)
 
bool empty () const
 

Static Public Member Functions

static size_t PrefixHash (base::Vector< const uint8_t > wire_bytes)
 

Private Attributes

std::map< Key, std::optional< std::weak_ptr< NativeModule > > > map_
 
base::Mutex mutex_
 
base::ConditionVariable cache_cv_
 

Detailed Description

Definition at line 73 of file wasm-engine.h.

Member Function Documentation

◆ empty()

bool v8::internal::wasm::NativeModuleCache::empty ( ) const
inline

Definition at line 130 of file wasm-engine.h.

Here is the caller graph for this function:

◆ Erase()

void v8::internal::wasm::NativeModuleCache::Erase ( NativeModule * native_module)

Definition at line 399 of file wasm-engine.cc.

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

◆ GetStreamingCompilationOwnership()

bool v8::internal::wasm::NativeModuleCache::GetStreamingCompilationOwnership ( size_t prefix_hash,
const CompileTimeImports & compile_imports )

Definition at line 335 of file wasm-engine.cc.

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

◆ MaybeGetNativeModule()

std::shared_ptr< NativeModule > v8::internal::wasm::NativeModuleCache::MaybeGetNativeModule ( ModuleOrigin origin,
base::Vector< const uint8_t > wire_bytes,
const CompileTimeImports & compile_imports )

Definition at line 295 of file wasm-engine.cc.

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

◆ PrefixHash()

size_t v8::internal::wasm::NativeModuleCache::PrefixHash ( base::Vector< const uint8_t > wire_bytes)
static

Definition at line 412 of file wasm-engine.cc.

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

◆ StreamingCompilationFailed()

void v8::internal::wasm::NativeModuleCache::StreamingCompilationFailed ( size_t prefix_hash,
const CompileTimeImports & compile_imports )

Definition at line 351 of file wasm-engine.cc.

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

◆ Update()

std::shared_ptr< NativeModule > v8::internal::wasm::NativeModuleCache::Update ( std::shared_ptr< NativeModule > native_module,
bool error )

Definition at line 360 of file wasm-engine.cc.

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

Member Data Documentation

◆ cache_cv_

base::ConditionVariable v8::internal::wasm::NativeModuleCache::cache_cv_
private

Definition at line 157 of file wasm-engine.h.

◆ map_

std::map<Key, std::optional<std::weak_ptr<NativeModule> > > v8::internal::wasm::NativeModuleCache::map_
private

Definition at line 150 of file wasm-engine.h.

◆ mutex_

base::Mutex v8::internal::wasm::NativeModuleCache::mutex_
private

Definition at line 152 of file wasm-engine.h.


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