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

#include <intrinsic_module.hpp>

Collaboration diagram for kagome::runtime::wavm::IntrinsicModule:

Public Member Functions

 IntrinsicModule (std::shared_ptr< CompartmentWrapper > compartment, WAVM::IR::MemoryType intrinsic_memory_type)
 
 IntrinsicModule (IntrinsicModule &module, WAVM::IR::MemoryType intrinsic_memory_type)
 
std::unique_ptr< IntrinsicModuleInstanceinstantiate () const
 
template<typename Ret , typename... Args>
void addFunction (std::string_view name, Ret(*f)(WAVM::Runtime::ContextRuntimeData *, Args...), WAVM::IR::FunctionType type)
 

Static Public Attributes

static constexpr std::string_view kIntrinsicMemoryName = "Runtime Memory"
 

Private Attributes

std::shared_ptr< CompartmentWrappercompartment_
 
WAVM::IR::MemoryType intrinsic_memory_type_
 
WAVM::Intrinsics::Module module_
 
WAVM::Intrinsics::Memory memory_
 
std::unordered_map< std::string, std::unique_ptr< WAVM::Intrinsics::Function > > functions_
 

Detailed Description

Definition at line 19 of file intrinsic_module.hpp.

Constructor & Destructor Documentation

kagome::runtime::wavm::IntrinsicModule::IntrinsicModule ( std::shared_ptr< CompartmentWrapper compartment,
WAVM::IR::MemoryType  intrinsic_memory_type 
)
inlineexplicit

Definition at line 23 of file intrinsic_module.hpp.

kagome::runtime::wavm::IntrinsicModule::IntrinsicModule ( IntrinsicModule module,
WAVM::IR::MemoryType  intrinsic_memory_type 
)
inline

Definition at line 30 of file intrinsic_module.hpp.

Member Function Documentation

template<typename Ret , typename... Args>
void kagome::runtime::wavm::IntrinsicModule::addFunction ( std::string_view  name,
Ret(*)(WAVM::Runtime::ContextRuntimeData *, Args...)  f,
WAVM::IR::FunctionType  type 
)
inline

Definition at line 51 of file intrinsic_module.hpp.

std::unique_ptr<IntrinsicModuleInstance> kagome::runtime::wavm::IntrinsicModule::instantiate ( ) const
inline

Definition at line 37 of file intrinsic_module.hpp.

Member Data Documentation

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

Definition at line 63 of file intrinsic_module.hpp.

std::unordered_map<std::string, std::unique_ptr<WAVM::Intrinsics::Function> > kagome::runtime::wavm::IntrinsicModule::functions_
private

Definition at line 71 of file intrinsic_module.hpp.

WAVM::IR::MemoryType kagome::runtime::wavm::IntrinsicModule::intrinsic_memory_type_
private

Definition at line 64 of file intrinsic_module.hpp.

constexpr std::string_view kagome::runtime::wavm::IntrinsicModule::kIntrinsicMemoryName = "Runtime Memory"
static

Definition at line 21 of file intrinsic_module.hpp.

WAVM::Intrinsics::Memory kagome::runtime::wavm::IntrinsicModule::memory_
private

Definition at line 68 of file intrinsic_module.hpp.

WAVM::Intrinsics::Module kagome::runtime::wavm::IntrinsicModule::module_
private

Definition at line 65 of file intrinsic_module.hpp.


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