pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn tb_retag_ptr_value(
&mut self,
kind: RetagKind,
val: &ImmTy<'tcx>,
) -> InterpResult<'tcx, ImmTy<'tcx>> { ... }
fn tb_retag_place_contents(
&mut self,
kind: RetagKind,
place: &PlaceTy<'tcx>,
) -> InterpResult<'tcx> { ... }
fn tb_protect_place(
&mut self,
place: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx, MPlaceTy<'tcx>> { ... }
fn tb_expose_tag(
&mut self,
alloc_id: AllocId,
tag: BorTag,
) -> InterpResult<'tcx> { ... }
fn print_tree(
&mut self,
alloc_id: AllocId,
show_unnamed: bool,
) -> InterpResult<'tcx> { ... }
fn tb_give_pointer_debug_name(
&mut self,
ptr: Pointer,
nth_parent: u8,
name: &str,
) -> InterpResult<'tcx> { ... }
}
Provided Methods§
Sourcefn tb_retag_ptr_value(
&mut self,
kind: RetagKind,
val: &ImmTy<'tcx>,
) -> InterpResult<'tcx, ImmTy<'tcx>>
fn tb_retag_ptr_value( &mut self, kind: RetagKind, val: &ImmTy<'tcx>, ) -> InterpResult<'tcx, ImmTy<'tcx>>
Retag a pointer. References are passed to from_ref_ty
and
raw pointers are never reborrowed.
Sourcefn tb_retag_place_contents(
&mut self,
kind: RetagKind,
place: &PlaceTy<'tcx>,
) -> InterpResult<'tcx>
fn tb_retag_place_contents( &mut self, kind: RetagKind, place: &PlaceTy<'tcx>, ) -> InterpResult<'tcx>
Retag all pointers that are stored in this place.
Sourcefn tb_protect_place(
&mut self,
place: &MPlaceTy<'tcx>,
) -> InterpResult<'tcx, MPlaceTy<'tcx>>
fn tb_protect_place( &mut self, place: &MPlaceTy<'tcx>, ) -> InterpResult<'tcx, MPlaceTy<'tcx>>
Protect a place so that it cannot be used any more for the duration of the current function call.
This is used to ensure soundness of in-place function argument/return passing.
Sourcefn tb_expose_tag(
&mut self,
alloc_id: AllocId,
tag: BorTag,
) -> InterpResult<'tcx>
fn tb_expose_tag( &mut self, alloc_id: AllocId, tag: BorTag, ) -> InterpResult<'tcx>
Mark the given tag as exposed. It was found on a pointer with the given AllocId.
Sourcefn print_tree(
&mut self,
alloc_id: AllocId,
show_unnamed: bool,
) -> InterpResult<'tcx>
fn print_tree( &mut self, alloc_id: AllocId, show_unnamed: bool, ) -> InterpResult<'tcx>
Display the tree.
Sourcefn tb_give_pointer_debug_name(
&mut self,
ptr: Pointer,
nth_parent: u8,
name: &str,
) -> InterpResult<'tcx>
fn tb_give_pointer_debug_name( &mut self, ptr: Pointer, nth_parent: u8, name: &str, ) -> InterpResult<'tcx>
Give a name to the pointer, usually the name it has in the source code (for debugging).
The name given is name
and the pointer that receives it is the nth_parent
of ptr
(with 0 representing ptr
itself)