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

Classes

struct  blacklist_injection_visitor
 
struct  data_segments_injection_visitor
 
struct  f32_binop_injector
 
struct  f32_promote_injector
 
struct  f32_relop_injector
 
struct  f32_trunc_i32_injector
 
struct  f32_trunc_i64_injector
 
struct  f32_unop_injector
 
struct  f64_binop_injector
 
struct  f64_demote_injector
 
struct  f64_relop_injector
 
struct  f64_trunc_i32_injector
 
struct  f64_trunc_i64_injector
 
struct  f64_unop_injector
 
struct  fix_call_index
 
struct  globals_injection_visitor
 
struct  i32_convert_f32_injector
 
struct  i32_convert_f64_injector
 
struct  i64_convert_f32_injector
 
struct  i64_convert_f64_injector
 
struct  injector_utils
 
struct  memories_injection_visitor
 
struct  module_injectors
 
struct  no_injections_injectors
 
struct  noop_injection_visitor
 
struct  pass_injector
 
struct  post_op_injectors
 
struct  pre_op_injectors
 
struct  tables_injection_visitor
 
class  wasm_binary_injection
 

Typedefs

using wasm_validate_func = std::function<void(IR::Module&)>
 

Functions

constexpr const char * inject_which_op (uint16_t opcode)
 

Typedef Documentation

◆ wasm_validate_func

Definition at line 129 of file wasm_sysio_injection.hpp.

Function Documentation

◆ inject_which_op()

const char * sysio::chain::wasm_injections::inject_which_op ( uint16_t opcode)
constexpr

Definition at line 168 of file wasm_sysio_injection.hpp.

168 {
169 switch ( opcode ) {
170 case wasm_ops::f32_add_code:
171 return u8"_sysio_f32_add";
172 case wasm_ops::f32_sub_code:
173 return u8"_sysio_f32_sub";
174 case wasm_ops::f32_mul_code:
175 return u8"_sysio_f32_mul";
176 case wasm_ops::f32_div_code:
177 return u8"_sysio_f32_div";
178 case wasm_ops::f32_min_code:
179 return u8"_sysio_f32_min";
180 case wasm_ops::f32_max_code:
181 return u8"_sysio_f32_max";
182 case wasm_ops::f32_copysign_code:
183 return u8"_sysio_f32_copysign";
184 case wasm_ops::f32_abs_code:
185 return u8"_sysio_f32_abs";
186 case wasm_ops::f32_neg_code:
187 return u8"_sysio_f32_neg";
188 case wasm_ops::f32_sqrt_code:
189 return u8"_sysio_f32_sqrt";
190 case wasm_ops::f32_ceil_code:
191 return u8"_sysio_f32_ceil";
192 case wasm_ops::f32_floor_code:
193 return u8"_sysio_f32_floor";
194 case wasm_ops::f32_trunc_code:
195 return u8"_sysio_f32_trunc";
196 case wasm_ops::f32_nearest_code:
197 return u8"_sysio_f32_nearest";
198 case wasm_ops::f32_eq_code:
199 return u8"_sysio_f32_eq";
200 case wasm_ops::f32_ne_code:
201 return u8"_sysio_f32_ne";
202 case wasm_ops::f32_lt_code:
203 return u8"_sysio_f32_lt";
204 case wasm_ops::f32_le_code:
205 return u8"_sysio_f32_le";
206 case wasm_ops::f32_gt_code:
207 return u8"_sysio_f32_gt";
208 case wasm_ops::f32_ge_code:
209 return u8"_sysio_f32_ge";
210 case wasm_ops::f64_add_code:
211 return u8"_sysio_f64_add";
212 case wasm_ops::f64_sub_code:
213 return u8"_sysio_f64_sub";
214 case wasm_ops::f64_mul_code:
215 return u8"_sysio_f64_mul";
216 case wasm_ops::f64_div_code:
217 return u8"_sysio_f64_div";
218 case wasm_ops::f64_min_code:
219 return u8"_sysio_f64_min";
220 case wasm_ops::f64_max_code:
221 return u8"_sysio_f64_max";
222 case wasm_ops::f64_copysign_code:
223 return u8"_sysio_f64_copysign";
224 case wasm_ops::f64_abs_code:
225 return u8"_sysio_f64_abs";
226 case wasm_ops::f64_neg_code:
227 return u8"_sysio_f64_neg";
228 case wasm_ops::f64_sqrt_code:
229 return u8"_sysio_f64_sqrt";
230 case wasm_ops::f64_ceil_code:
231 return u8"_sysio_f64_ceil";
232 case wasm_ops::f64_floor_code:
233 return u8"_sysio_f64_floor";
234 case wasm_ops::f64_trunc_code:
235 return u8"_sysio_f64_trunc";
236 case wasm_ops::f64_nearest_code:
237 return u8"_sysio_f64_nearest";
238 case wasm_ops::f64_eq_code:
239 return u8"_sysio_f64_eq";
240 case wasm_ops::f64_ne_code:
241 return u8"_sysio_f64_ne";
242 case wasm_ops::f64_lt_code:
243 return u8"_sysio_f64_lt";
244 case wasm_ops::f64_le_code:
245 return u8"_sysio_f64_le";
246 case wasm_ops::f64_gt_code:
247 return u8"_sysio_f64_gt";
248 case wasm_ops::f64_ge_code:
249 return u8"_sysio_f64_ge";
250 case wasm_ops::f64_promote_f32_code:
251 return u8"_sysio_f32_promote";
252 case wasm_ops::f32_demote_f64_code:
253 return u8"_sysio_f64_demote";
254 case wasm_ops::i32_trunc_u_f32_code:
255 return u8"_sysio_f32_trunc_i32u";
256 case wasm_ops::i32_trunc_s_f32_code:
257 return u8"_sysio_f32_trunc_i32s";
258 case wasm_ops::i32_trunc_u_f64_code:
259 return u8"_sysio_f64_trunc_i32u";
260 case wasm_ops::i32_trunc_s_f64_code:
261 return u8"_sysio_f64_trunc_i32s";
262 case wasm_ops::i64_trunc_u_f32_code:
263 return u8"_sysio_f32_trunc_i64u";
264 case wasm_ops::i64_trunc_s_f32_code:
265 return u8"_sysio_f32_trunc_i64s";
266 case wasm_ops::i64_trunc_u_f64_code:
267 return u8"_sysio_f64_trunc_i64u";
268 case wasm_ops::i64_trunc_s_f64_code:
269 return u8"_sysio_f64_trunc_i64s";
270 case wasm_ops::f32_convert_s_i32_code:
271 return u8"_sysio_i32_to_f32";
272 case wasm_ops::f32_convert_u_i32_code:
273 return u8"_sysio_ui32_to_f32";
274 case wasm_ops::f32_convert_s_i64_code:
275 return u8"_sysio_i64_f32";
276 case wasm_ops::f32_convert_u_i64_code:
277 return u8"_sysio_ui64_to_f32";
278 case wasm_ops::f64_convert_s_i32_code:
279 return u8"_sysio_i32_to_f64";
280 case wasm_ops::f64_convert_u_i32_code:
281 return u8"_sysio_ui32_to_f64";
282 case wasm_ops::f64_convert_s_i64_code:
283 return u8"_sysio_i64_to_f64";
284 case wasm_ops::f64_convert_u_i64_code:
285 return u8"_sysio_ui64_to_f64";
286
287 default:
288 FC_THROW_EXCEPTION( sysio::chain::wasm_execution_error, "Error, unknown opcode in injection ${op}", ("op", opcode));
289 }
290 }
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
Here is the caller graph for this function: