update for memory_deallocated moving to AllocExtra
This commit is contained in:
parent
2e6eb0070b
commit
f5bd85d009
2 changed files with 5 additions and 14 deletions
|
|
@ -446,15 +446,6 @@ impl<'a, 'mir, 'tcx> Machine<'a, 'mir, 'tcx> for Evaluator<'tcx> {
|
|||
Cow::Owned(alloc)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn memory_deallocated(
|
||||
alloc: &mut Allocation<Borrow, Self::AllocExtra>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
alloc.extra.memory_deallocated(ptr, size)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn tag_reference(
|
||||
ecx: &mut EvalContext<'a, 'mir, 'tcx, Self>,
|
||||
|
|
|
|||
|
|
@ -363,20 +363,20 @@ impl AllocationExtra<Borrow> for Stacks {
|
|||
// Writes behave exactly like the first half of a reborrow-to-mut
|
||||
alloc.extra.use_and_maybe_re_borrow(ptr, size, UsageKind::Write, None)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Stacks {
|
||||
#[inline(always)]
|
||||
pub fn memory_deallocated(
|
||||
&mut self,
|
||||
fn memory_deallocated<'tcx>(
|
||||
alloc: &mut Allocation<Borrow, Stacks>,
|
||||
ptr: Pointer<Borrow>,
|
||||
size: Size,
|
||||
) -> EvalResult<'tcx> {
|
||||
// This is like mutating
|
||||
self.use_and_maybe_re_borrow(ptr, size, UsageKind::Write, None)
|
||||
alloc.extra.use_and_maybe_re_borrow(ptr, size, UsageKind::Write, None)
|
||||
// FIXME: Error out of there are any barriers?
|
||||
}
|
||||
}
|
||||
|
||||
impl<'tcx> Stacks {
|
||||
/// Pushes the first item to the stacks.
|
||||
pub fn first_item(
|
||||
&mut self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue