miri::shims::foreign_items

Trait EvalContextExt

Source
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn emulate_foreign_item(
        &mut self,
        link_name: Symbol,
        abi: &FnAbi<'tcx, Ty<'tcx>>,
        args: &[OpTy<'tcx>],
        dest: &MPlaceTy<'tcx>,
        ret: Option<BasicBlock>,
        unwind: UnwindAction,
    ) -> InterpResult<'tcx, Option<(&'tcx Body<'tcx>, Instance<'tcx>)>> { ... }
    fn is_dyn_sym(&self, name: &str) -> bool { ... }
    fn emulate_dyn_sym(
        &mut self,
        sym: DynSym,
        abi: &FnAbi<'tcx, Ty<'tcx>>,
        args: &[OpTy<'tcx>],
        dest: &MPlaceTy<'tcx>,
        ret: Option<BasicBlock>,
        unwind: UnwindAction,
    ) -> InterpResult<'tcx> { ... }
    fn lookup_exported_symbol(
        &mut self,
        link_name: Symbol,
    ) -> InterpResult<'tcx, Option<(&'tcx Body<'tcx>, Instance<'tcx>)>> { ... }
}

Provided Methods§

Source

fn emulate_foreign_item( &mut self, link_name: Symbol, abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OpTy<'tcx>], dest: &MPlaceTy<'tcx>, ret: Option<BasicBlock>, unwind: UnwindAction, ) -> InterpResult<'tcx, Option<(&'tcx Body<'tcx>, Instance<'tcx>)>>

Emulates calling a foreign item, failing if the item is not supported. This function will handle goto_block if needed. Returns Ok(None) if the foreign item was completely handled by this function. Returns Ok(Some(body)) if processing the foreign item is delegated to another function.

Source

fn is_dyn_sym(&self, name: &str) -> bool

Source

fn emulate_dyn_sym( &mut self, sym: DynSym, abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OpTy<'tcx>], dest: &MPlaceTy<'tcx>, ret: Option<BasicBlock>, unwind: UnwindAction, ) -> InterpResult<'tcx>

Emulates a call to a DynSym.

Source

fn lookup_exported_symbol( &mut self, link_name: Symbol, ) -> InterpResult<'tcx, Option<(&'tcx Body<'tcx>, Instance<'tcx>)>>

Lookup the body of a function that has link_name as the symbol name.

Implementors§

Source§

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