[][src]Function wasm_bindgen_multi_value_xform::run

pub fn run(
    module: &mut Module,
    memory: MemoryId,
    shadow_stack_pointer: GlobalId,
    to_xform: &[(FunctionId, usize, Vec<ValType>)]
) -> Result<Vec<FunctionId>, Error>

Run the transformation.

See the module-level docs for details on the transformation.

  • memory is the module's memory that has the shadow stack where return pointers are allocated within.

  • shadow_stack_pointer is the global that is being used as the stack pointer for the shadow stack. With LLVM, this is typically the first global.

  • to_xform is the set of exported functions we want to transform and information required to transform them. The usize is the index of the return pointer parameter that will be removed. The Vec<walrus::ValType> is the new result type that will be returned directly instead of via the return pointer.

Returns a list of wrappers which have multi value signatures and call the corresponding element in the to_xform list.