Trait miri::shims::native_lib::EvalContextExt

source ·
pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
    // Provided method
    fn call_native_fn(
        &mut self,
        link_name: Symbol,
        dest: &MPlaceTy<'tcx, Provenance>,
        args: &[OpTy<'tcx, Provenance>]
    ) -> InterpResult<'tcx, bool> { ... }
}

Provided Methods§

source

fn call_native_fn( &mut self, link_name: Symbol, dest: &MPlaceTy<'tcx, Provenance>, args: &[OpTy<'tcx, Provenance>] ) -> InterpResult<'tcx, bool>

Call the native host function, with supplied arguments. Needs to convert all the arguments from their Miri representations to a native form (through libffi call). Then, convert the return value from the native form into something that can be stored in Miri’s internal memory.

Implementors§

source§

impl<'mir, 'tcx: 'mir> EvalContextExt<'mir, 'tcx> for MiriInterpCx<'mir, 'tcx>