Trait miri::alloc_addresses::EvalContextExt

source ·
pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
    // Provided methods
    fn expose_ptr(
        &mut self,
        alloc_id: AllocId,
        tag: BorTag
    ) -> InterpResult<'tcx> { ... }
    fn ptr_from_addr_cast(
        &self,
        addr: u64
    ) -> InterpResult<'tcx, Pointer<Option<Provenance>>> { ... }
    fn adjust_alloc_root_pointer(
        &self,
        ptr: Pointer<CtfeProvenance>,
        tag: BorTag,
        kind: MemoryKind
    ) -> InterpResult<'tcx, Pointer<Provenance>> { ... }
    fn ptr_get_alloc(&self, ptr: Pointer<Provenance>) -> Option<(AllocId, Size)> { ... }
}

Provided Methods§

source

fn expose_ptr(&mut self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx>

source

fn ptr_from_addr_cast( &self, addr: u64 ) -> InterpResult<'tcx, Pointer<Option<Provenance>>>

source

fn adjust_alloc_root_pointer( &self, ptr: Pointer<CtfeProvenance>, tag: BorTag, kind: MemoryKind ) -> InterpResult<'tcx, Pointer<Provenance>>

Convert a relative (tcx) pointer to a Miri pointer.

source

fn ptr_get_alloc(&self, ptr: Pointer<Provenance>) -> Option<(AllocId, Size)>

When a pointer is used for a memory access, this computes where in which allocation the access is going.

Implementors§

source§

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