1
Fork 0

make retagging work even with 'unstable' places

This commit is contained in:
Ralf Jung 2022-12-05 15:17:11 +01:00
parent c5351ad4dc
commit 9397ea1368
15 changed files with 135 additions and 128 deletions

View file

@ -373,9 +373,21 @@ pub trait Machine<'mir, 'tcx>: Sized {
Ok(())
}
/// Executes a retagging operation.
/// Executes a retagging operation for a single pointer.
/// Returns the possibly adjusted pointer.
#[inline]
fn retag(
fn retag_ptr_value(
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
_kind: mir::RetagKind,
val: &ImmTy<'tcx, Self::Provenance>,
) -> InterpResult<'tcx, ImmTy<'tcx, Self::Provenance>> {
Ok(val.clone())
}
/// Executes a retagging operation on a compound value.
/// Replaces all pointers stored in the given place.
#[inline]
fn retag_place_contents(
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
_kind: mir::RetagKind,
_place: &PlaceTy<'tcx, Self::Provenance>,