Trait orca_wasm::opcode::MacroOpcode

source ·
pub trait MacroOpcode<'a>: Inject<'a> {
    // Provided methods
    fn u32_const(&mut self, value: u32) -> &mut Self { ... }
    fn u64_const(&mut self, value: u64) -> &mut Self { ... }
}
Expand description

Defines injection behaviour. Takes a wasmparser::Operator and instructions are defined here.

Provided Methods§

source

fn u32_const(&mut self, value: u32) -> &mut Self

Helper function to reinterpret an u32 as an i32 and inject an i32.const instruction with that reinterpreted value. (Useful to emitting memory addresses.) We cast using the as keyword to accomplish this. See https://github.com/thesuhas/orca/issues/133 for an explanation.

source

fn u64_const(&mut self, value: u64) -> &mut Self

Helper function to reinterpret an u64 as an i64 and inject an i64.const instruction with that reinterpreted value. (Useful to emitting memory addresses.) We cast using the as keyword to accomplish this. See https://github.com/thesuhas/orca/issues/133 for an explanation.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a> MacroOpcode<'a> for FunctionBuilder<'a>

source§

impl<'a> MacroOpcode<'a> for ModuleIterator<'_, 'a>

source§

impl<'a, 'b> MacroOpcode<'b> for FunctionModifier<'a, 'b>

source§

impl<'a, 'b> MacroOpcode<'b> for ComponentIterator<'a, 'b>