fn call_runtime_function(
        pos: &mut FuncCursor,
        runtime_func: &RuntimeFunctionData,
        args: &[Value],
    ) -> WasmResult<Value> {
        // TODO: cache?
        let signature = pos.func.import_signature(runtime_func.signature.clone());
        let runtime_func_ref = pos.func.import_function(ExtFuncData {
            name: ExternalName::user(RUNTIME_NAMESPACE, runtime_func.index),
            signature,
            colocated: false,
        });
        let inst = pos.ins().call(runtime_func_ref, args);
        Ok(*pos.func.dfg.inst_results(inst).first().unwrap())
    }
/// Call a runtime function and return the result.
Call a runtime function and return the result.
Call a runtime function and return the result .
fn call_runtime_function(
        pos: &mut FuncCursor,
        runtime_func: &RuntimeFunctionData,
        args: &[Value],
    ) -> WasmResult<Value> {
        // TODO: cache?
        let signature = pos.func.import_signature(runtime_func.signature.clone());
        let runtime_func_ref = pos.func.import_function(ExtFuncData {
            name: ExternalName::user(RUNTIME_NAMESPACE, runtime_func.index),
            signature,
            colocated: false,
        });
        let inst = pos.ins().call(runtime_func_ref, args);
        Ok(*pos.func.dfg.inst_results(inst).first().unwrap())
    }
fn call_runtime_function ( pos : & mut FuncCursor , runtime_func : & RuntimeFunctionData , args : & [ Value ] , ) -> WasmResult < Value > { // TODO: cache? let signature = pos . func . import_signature ( runtime_func . signature . clone ( ) ) ; let runtime_func_ref = pos . func . import_function ( ExtFuncData { name : ExternalName :: user ( RUNTIME_NAMESPACE , runtime_func . index ) , signature , colocated : false , } ) ; let inst = pos . ins ( ) . call ( runtime_func_ref , args ) ; Ok ( * pos . func . dfg . inst_results ( inst ) . first ( ) . unwrap ( ) ) }
Call a runtime function and return the result.
Call a runtime function and return the result .
pos
&mut FuncCursor
runtime_func
&RuntimeFunctionData
args
&[Value]
pos
&mut FuncCursor
runtime_func
&RuntimeFunctionData
args
&[Value]