remove some provenance-related machine hooks that Miri no longer needs
This commit is contained in:
parent
47ba935965
commit
665a7e8f56
4 changed files with 17 additions and 46 deletions
|
@ -135,9 +135,6 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
/// Whether to enforce integers and floats being initialized.
|
||||
fn enforce_number_init(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
|
||||
|
||||
/// Whether to enforce integers and floats not having provenance.
|
||||
fn enforce_number_no_provenance(ecx: &InterpCx<'mir, 'tcx, Self>) -> bool;
|
||||
|
||||
/// Whether function calls should be [ABI](CallAbi)-checked.
|
||||
fn enforce_abi(_ecx: &InterpCx<'mir, 'tcx, Self>) -> bool {
|
||||
true
|
||||
|
@ -300,13 +297,6 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
|||
addr: u64,
|
||||
) -> InterpResult<'tcx, Pointer<Option<Self::Provenance>>>;
|
||||
|
||||
/// Hook for returning a pointer from a transmute-like operation on an addr.
|
||||
/// This is only needed to support Miri's (unsound) "allow-ptr-int-transmute" flag.
|
||||
fn ptr_from_addr_transmute(
|
||||
ecx: &InterpCx<'mir, 'tcx, Self>,
|
||||
addr: u64,
|
||||
) -> Pointer<Option<Self::Provenance>>;
|
||||
|
||||
/// Marks a pointer as exposed, allowing it's provenance
|
||||
/// to be recovered. "Pointer-to-int cast"
|
||||
fn expose_ptr(
|
||||
|
@ -469,11 +459,6 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
|||
true
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn enforce_number_no_provenance(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn checked_binop_checks_overflow(_ecx: &InterpCx<$mir, $tcx, Self>) -> bool {
|
||||
true
|
||||
|
@ -518,14 +503,6 @@ pub macro compile_time_machine(<$mir: lifetime, $tcx: lifetime>) {
|
|||
ptr
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn ptr_from_addr_transmute(
|
||||
_ecx: &InterpCx<$mir, $tcx, Self>,
|
||||
addr: u64,
|
||||
) -> Pointer<Option<AllocId>> {
|
||||
Pointer::from_addr(addr)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn ptr_from_addr_cast(
|
||||
_ecx: &InterpCx<$mir, $tcx, Self>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue