| 
    Kagome
    
   Polkadot Runtime Engine in C++17 
   | 
 
#include <module_instance_impl.hpp>
Public Types | |
| enum | Error { Error::UNEXPECTED_EXIT = 1, Error::EXECUTION_ERROR, Error::CAN_NOT_OBTAIN_GLOBAL } | 
  Public Types inherited from kagome::runtime::ModuleInstance | |
| using | SegmentOffset = size_t | 
| using | SegmentData = gsl::span< const uint8_t > | 
| using | DataSegmentProcessor = std::function< void(SegmentOffset, SegmentData)> | 
Public Member Functions | |
| ModuleInstanceImpl (InstanceEnvironment &&env, std::shared_ptr< wasm::Module > parent, std::shared_ptr< RuntimeExternalInterface > rei, const common::Hash256 &code_hash) | |
| const common::Hash256 & | getCodeHash () const override | 
| outcome::result< PtrSize > | callExportFunction (std::string_view name, common::BufferView args) const override | 
| outcome::result< std::optional< WasmValue > > | getGlobal (std::string_view name) const override | 
| InstanceEnvironment const & | getEnvironment () const override | 
| outcome::result< void > | resetEnvironment () override | 
| void | forDataSegment (DataSegmentProcessor const &callback) const override | 
  Public Member Functions inherited from kagome::runtime::ModuleInstance | |
| virtual | ~ModuleInstance ()=default | 
Private Attributes | |
| InstanceEnvironment | env_ | 
| std::shared_ptr< RuntimeExternalInterface > | rei_ | 
| std::shared_ptr< wasm::Module > | parent_ | 
| common::Hash256 | code_hash_ | 
| std::unique_ptr< wasm::ModuleInstance > | module_instance_ | 
| log::Logger | logger_ | 
Definition at line 23 of file module_instance_impl.hpp.
| Enumerator | |
|---|---|
| UNEXPECTED_EXIT | |
| EXECUTION_ERROR | |
| CAN_NOT_OBTAIN_GLOBAL | |
Definition at line 25 of file module_instance_impl.hpp.
| kagome::runtime::binaryen::ModuleInstanceImpl::ModuleInstanceImpl | ( | InstanceEnvironment && | env, | 
| std::shared_ptr< wasm::Module > | parent, | ||
| std::shared_ptr< RuntimeExternalInterface > | rei, | ||
| const common::Hash256 & | code_hash | ||
| ) | 
Definition at line 76 of file module_instance_impl.cpp.
      
  | 
  overridevirtual | 
Call the instance's function
| name | - name of the function | 
| args | - a pointer-size describing a buffer with the function parameters | 
Implements kagome::runtime::ModuleInstance.
Definition at line 93 of file module_instance_impl.cpp.
      
  | 
  overridevirtual | 
Implements kagome::runtime::ModuleInstance.
Definition at line 148 of file module_instance_impl.cpp.
      
  | 
  inlineoverridevirtual | 
Implements kagome::runtime::ModuleInstance.
Definition at line 36 of file module_instance_impl.hpp.
      
  | 
  overridevirtual | 
Implements kagome::runtime::ModuleInstance.
Definition at line 139 of file module_instance_impl.cpp.
      
  | 
  overridevirtual | 
Implements kagome::runtime::ModuleInstance.
Definition at line 115 of file module_instance_impl.cpp.
      
  | 
  overridevirtual | 
Implements kagome::runtime::ModuleInstance.
Definition at line 143 of file module_instance_impl.cpp.
      
  | 
  private | 
Definition at line 58 of file module_instance_impl.hpp.
      
  | 
  private | 
Definition at line 53 of file module_instance_impl.hpp.
      
  | 
  private | 
Definition at line 61 of file module_instance_impl.hpp.
      
  | 
  private | 
Definition at line 60 of file module_instance_impl.hpp.
      
  | 
  private | 
Definition at line 56 of file module_instance_impl.hpp.
      
  | 
  private | 
Definition at line 54 of file module_instance_impl.hpp.