Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::wasm_injections::fix_call_index Struct Reference

#include <wasm_sysio_injection.hpp>

Static Public Member Functions

static void init ()
 
static void accept (wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
 

Static Public Attributes

static constexpr bool kills = false
 
static constexpr bool post = false
 

Detailed Description

Definition at line 149 of file wasm_sysio_injection.hpp.

Member Function Documentation

◆ accept()

static void sysio::chain::wasm_injections::fix_call_index::accept ( wasm_ops::instr * inst,
wasm_ops::visitor_arg & arg )
inlinestatic

Definition at line 153 of file wasm_sysio_injection.hpp.

153 {
154 wasm_ops::op_types<>::call_t* call_inst = reinterpret_cast<wasm_ops::op_types<>::call_t*>(inst);
155 auto mapped_index = injector_utils::injected_index_mapping.find(call_inst->field);
156
157 if ( mapped_index != injector_utils::injected_index_mapping.end() ) {
158 call_inst->field = mapped_index->second;
159 }
160 else {
161 call_inst->field += injector_utils::registered_injected.size();
162 }
163 }
static std::map< uint32_t, uint32_t > injected_index_mapping
static std::map< std::string, uint32_t > registered_injected

◆ init()

static void sysio::chain::wasm_injections::fix_call_index::init ( )
inlinestatic

Definition at line 152 of file wasm_sysio_injection.hpp.

152{}

Member Data Documentation

◆ kills

bool sysio::chain::wasm_injections::fix_call_index::kills = false
staticconstexpr

Definition at line 150 of file wasm_sysio_injection.hpp.

◆ post

bool sysio::chain::wasm_injections::fix_call_index::post = false
staticconstexpr

Definition at line 151 of file wasm_sysio_injection.hpp.


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