Skip to content

Commit

Permalink
Auto merge of #2488 - saethlin:rename-memory-hooks, r=RalfJung
Browse files Browse the repository at this point in the history
Rename memory hooks

Companion to rust-lang/rust#100600
  • Loading branch information
bors committed Aug 16, 2022
2 parents 793f198 + 3992f06 commit 39c606f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2fbc08e2ce64dee45a29cb6133da6b32366268aa
8556e6620e4866526b3cea767ad8c20ae877a569
12 changes: 6 additions & 6 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
}

#[inline(always)]
fn memory_read(
fn before_memory_read(
_tcx: TyCtxt<'tcx>,
machine: &Self,
alloc_extra: &AllocExtra,
Expand All @@ -796,7 +796,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
)?;
}
if let Some(stacked_borrows) = &alloc_extra.stacked_borrows {
stacked_borrows.borrow_mut().memory_read(
stacked_borrows.borrow_mut().before_memory_read(
alloc_id,
prov_extra,
range,
Expand All @@ -812,7 +812,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
}

#[inline(always)]
fn memory_written(
fn before_memory_write(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
Expand All @@ -828,7 +828,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
)?;
}
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
stacked_borrows.get_mut().memory_written(
stacked_borrows.get_mut().before_memory_write(
alloc_id,
prov_extra,
range,
Expand All @@ -844,7 +844,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
}

#[inline(always)]
fn memory_deallocated(
fn before_memory_deallocation(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
Expand All @@ -863,7 +863,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
)?;
}
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
stacked_borrows.get_mut().memory_deallocated(
stacked_borrows.get_mut().before_memory_deallocation(
alloc_id,
prove_extra,
range,
Expand Down
6 changes: 3 additions & 3 deletions src/stacked_borrows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ impl Stacks {
}

#[inline(always)]
pub fn memory_read<'tcx>(
pub fn before_memory_read<'tcx>(
&mut self,
alloc_id: AllocId,
tag: ProvenanceExtra,
Expand Down Expand Up @@ -688,7 +688,7 @@ impl Stacks {
}

#[inline(always)]
pub fn memory_written<'tcx>(
pub fn before_memory_write<'tcx>(
&mut self,
alloc_id: AllocId,
tag: ProvenanceExtra,
Expand Down Expand Up @@ -719,7 +719,7 @@ impl Stacks {
}

#[inline(always)]
pub fn memory_deallocated<'tcx>(
pub fn before_memory_deallocation<'tcx>(
&mut self,
alloc_id: AllocId,
tag: ProvenanceExtra,
Expand Down

0 comments on commit 39c606f

Please sign in to comment.