pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriEvalContextExt<'mir, 'tcx> {
    fn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align { ... }
    fn malloc(
        &mut self,
        size: u64,
        zero_init: bool,
        kind: MiriMemoryKind
    ) -> InterpResult<'tcx, Pointer<Option<Provenance>>> { ... } fn free(
        &mut self,
        ptr: Pointer<Option<Provenance>>,
        kind: MiriMemoryKind
    ) -> InterpResult<'tcx> { ... } fn realloc(
        &mut self,
        old_ptr: Pointer<Option<Provenance>>,
        new_size: u64,
        kind: MiriMemoryKind
    ) -> InterpResult<'tcx, Pointer<Option<Provenance>>> { ... } fn lookup_exported_symbol(
        &mut self,
        link_name: Symbol
    ) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>> { ... } fn emulate_foreign_item(
        &mut self,
        def_id: DefId,
        abi: Abi,
        args: &[OpTy<'tcx, Provenance>],
        dest: &PlaceTy<'tcx, Provenance>,
        ret: Option<BasicBlock>,
        unwind: StackPopUnwind
    ) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>> { ... } fn emulate_allocator(
        &mut self,
        symbol: Symbol,
        default: impl FnOnce(&mut MiriEvalContext<'mir, 'tcx>) -> InterpResult<'tcx>
    ) -> InterpResult<'tcx, EmulateByNameResult<'mir, 'tcx>> { ... } fn emulate_foreign_item_by_name(
        &mut self,
        link_name: Symbol,
        abi: Abi,
        args: &[OpTy<'tcx, Provenance>],
        dest: &PlaceTy<'tcx, Provenance>
    ) -> InterpResult<'tcx, EmulateByNameResult<'mir, 'tcx>> { ... } fn check_alloc_request(size: u64, align: u64) -> InterpResult<'tcx> { ... } }

Provided Methods

Returns the minimum alignment for the target architecture for allocations of the given size.

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

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.

Emulates calling the internal _rust* allocator functions

Emulates calling a foreign item using its name.

Check some basic requirements for this allocation request: non-zero size, power-of-two alignment.

Implementors