Skip to main content

EvalContextExt

Trait EvalContextExt 

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

Provided Methods§

Source

fn call_native_fn( &mut self, link_name: Symbol, dest: &MPlaceTy<'tcx>, args: &[OpTy<'tcx>], ) -> 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.

Returns true if a call has been made, false if no functions of this name was found.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>