Trait miri::shims::foreign_items::EvalContextExtPriv
source · trait EvalContextExtPriv<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
// Provided methods
fn read_byte_slice<'i>(
&'i self,
bytes: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, &'i [u8]>
where 'mir: 'i { ... }
fn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align { ... }
fn emulate_allocator(
&mut self,
default: impl FnOnce(&mut MiriInterpCx<'mir, 'tcx>) -> InterpResult<'tcx>
) -> InterpResult<'tcx, EmulateForeignItemResult> { ... }
fn emulate_foreign_item_inner(
&mut self,
link_name: Symbol,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &MPlaceTy<'tcx, Provenance>
) -> InterpResult<'tcx, EmulateForeignItemResult> { ... }
fn check_alloc_request(size: u64, align: u64) -> InterpResult<'tcx> { ... }
}
Provided Methods§
sourcefn read_byte_slice<'i>(
&'i self,
bytes: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, &'i [u8]>where
'mir: 'i,
fn read_byte_slice<'i>(
&'i self,
bytes: &OpTy<'tcx, Provenance>
) -> InterpResult<'tcx, &'i [u8]>where
'mir: 'i,
Read bytes from a (ptr, len)
argument
sourcefn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align
fn min_align(&self, size: u64, kind: MiriMemoryKind) -> Align
Returns the minimum alignment for the target architecture for allocations of the given size.
sourcefn emulate_allocator(
&mut self,
default: impl FnOnce(&mut MiriInterpCx<'mir, 'tcx>) -> InterpResult<'tcx>
) -> InterpResult<'tcx, EmulateForeignItemResult>
fn emulate_allocator( &mut self, default: impl FnOnce(&mut MiriInterpCx<'mir, 'tcx>) -> InterpResult<'tcx> ) -> InterpResult<'tcx, EmulateForeignItemResult>
Emulates calling the internal _rust* allocator functions
fn emulate_foreign_item_inner( &mut self, link_name: Symbol, abi: Abi, args: &[OpTy<'tcx, Provenance>], dest: &MPlaceTy<'tcx, Provenance> ) -> InterpResult<'tcx, EmulateForeignItemResult>
sourcefn check_alloc_request(size: u64, align: u64) -> InterpResult<'tcx>
fn check_alloc_request(size: u64, align: u64) -> InterpResult<'tcx>
Check some basic requirements for this allocation request: non-zero size, power-of-two alignment.
Object Safety§
This trait is not object safe.