commit
bb5cea0d59
@ -1 +1 @@
|
||||
nightly-2018-11-08
|
||||
nightly-2018-11-12
|
||||
|
18
src/lib.rs
18
src/lib.rs
@ -446,24 +446,6 @@ fn adjust_static_allocation(
|
||||
Cow::Owned(alloc)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn memory_read(
|
||||
alloc: &Allocation<Borrow, Self::AllocExtra>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
alloc.extra.memory_read(ptr, size)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn memory_written(
|
||||
alloc: &mut Allocation<Borrow, Self::AllocExtra>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
alloc.extra.memory_written(ptr, size)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn memory_deallocated(
|
||||
alloc: &mut Allocation<Borrow, Self::AllocExtra>,
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
use crate::{
|
||||
EvalResult, MiriEvalContext, HelpersEvalContextExt,
|
||||
MemoryKind, MiriMemoryKind, RangeMap, AllocId,
|
||||
MemoryKind, MiriMemoryKind, RangeMap, AllocId, Allocation, AllocationExtra,
|
||||
Pointer, PlaceTy, MPlaceTy,
|
||||
};
|
||||
|
||||
@ -343,27 +343,30 @@ fn check_frozen(
|
||||
}
|
||||
|
||||
/// Hooks and glue
|
||||
impl<'tcx> Stacks {
|
||||
impl AllocationExtra<Borrow> for Stacks {
|
||||
#[inline(always)]
|
||||
pub fn memory_read(
|
||||
&self,
|
||||
fn memory_read<'tcx>(
|
||||
alloc: &Allocation<Borrow, Stacks>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
// Reads behave exactly like the first half of a reborrow-to-shr
|
||||
self.use_and_maybe_re_borrow(ptr, size, UsageKind::Read, None)
|
||||
alloc.extra.use_and_maybe_re_borrow(ptr, size, UsageKind::Read, None)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn memory_written(
|
||||
&mut self,
|
||||
fn memory_written<'tcx>(
|
||||
alloc: &mut Allocation<Borrow, Stacks>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
// Writes behave exactly like the first half of a reborrow-to-mut
|
||||
self.use_and_maybe_re_borrow(ptr, size, UsageKind::Write, None)
|
||||
alloc.extra.use_and_maybe_re_borrow(ptr, size, UsageKind::Write, None)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Stacks {
|
||||
#[inline(always)]
|
||||
pub fn memory_deallocated(
|
||||
&mut self,
|
||||
ptr: Pointer<Borrow>,
|
||||
|
@ -1,6 +1,3 @@
|
||||
// FIXME: Disabled due to https://github.com/rust-lang/rust/issues/55747
|
||||
// ignore-test
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user