Kagome
Polkadot Runtime Engine in C++17
kagome::runtime::wavm::ModuleImpl Class Referencefinal

#include <module.hpp>

Inheritance diagram for kagome::runtime::wavm::ModuleImpl:
Collaboration diagram for kagome::runtime::wavm::ModuleImpl:

Public Member Functions

outcome::result< std::shared_ptr< ModuleInstance > > instantiate () const override
 
- Public Member Functions inherited from kagome::runtime::Module
virtual ~Module ()=default
 

Static Public Member Functions

static std::unique_ptr< ModuleImplcompileFrom (std::shared_ptr< CompartmentWrapper > compartment, ModuleParams &module_params, std::shared_ptr< IntrinsicModule > intrinsic_module, std::shared_ptr< const InstanceEnvironmentFactory > env_factory, gsl::span< const uint8_t > code, const common::Hash256 &code_hash)
 

Private Member Functions

 ModuleImpl (std::shared_ptr< CompartmentWrapper > compartment, std::shared_ptr< const IntrinsicModule > intrinsic_module, std::shared_ptr< const InstanceEnvironmentFactory > env_factory, std::shared_ptr< WAVM::Runtime::Module > module, const common::Hash256 &code_hash)
 
WAVM::Runtime::ImportBindings link (IntrinsicResolver &resolver) const
 

Private Attributes

std::shared_ptr< const InstanceEnvironmentFactoryenv_factory_
 
std::shared_ptr< CompartmentWrappercompartment_
 
std::shared_ptr< const IntrinsicModuleintrinsic_module_
 
std::shared_ptr< WAVM::Runtime::Module > module_
 
const common::Hash256 code_hash_
 
log::Logger logger_
 

Detailed Description

Definition at line 31 of file module.hpp.

Constructor & Destructor Documentation

kagome::runtime::wavm::ModuleImpl::ModuleImpl ( std::shared_ptr< CompartmentWrapper compartment,
std::shared_ptr< const IntrinsicModule intrinsic_module,
std::shared_ptr< const InstanceEnvironmentFactory env_factory,
std::shared_ptr< WAVM::Runtime::Module >  module,
const common::Hash256 code_hash 
)
private

Definition at line 61 of file module.cpp.

Member Function Documentation

std::unique_ptr< ModuleImpl > kagome::runtime::wavm::ModuleImpl::compileFrom ( std::shared_ptr< CompartmentWrapper compartment,
ModuleParams module_params,
std::shared_ptr< IntrinsicModule intrinsic_module,
std::shared_ptr< const InstanceEnvironmentFactory env_factory,
gsl::span< const uint8_t >  code,
const common::Hash256 code_hash 
)
static

Definition at line 23 of file module.cpp.

outcome::result< std::shared_ptr< ModuleInstance > > kagome::runtime::wavm::ModuleImpl::instantiate ( ) const
overridevirtual

Implements kagome::runtime::Module.

Definition at line 79 of file module.cpp.

WAVM::Runtime::ImportBindings kagome::runtime::wavm::ModuleImpl::link ( IntrinsicResolver resolver) const
private

Definition at line 115 of file module.cpp.

Member Data Documentation

const common::Hash256 kagome::runtime::wavm::ModuleImpl::code_hash_
private

Definition at line 57 of file module.hpp.

std::shared_ptr<CompartmentWrapper> kagome::runtime::wavm::ModuleImpl::compartment_
private

Definition at line 54 of file module.hpp.

std::shared_ptr<const InstanceEnvironmentFactory> kagome::runtime::wavm::ModuleImpl::env_factory_
private

Definition at line 53 of file module.hpp.

std::shared_ptr<const IntrinsicModule> kagome::runtime::wavm::ModuleImpl::intrinsic_module_
private

Definition at line 55 of file module.hpp.

log::Logger kagome::runtime::wavm::ModuleImpl::logger_
private

Definition at line 58 of file module.hpp.

std::shared_ptr<WAVM::Runtime::Module> kagome::runtime::wavm::ModuleImpl::module_
private

Definition at line 56 of file module.hpp.


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