Skip to content

Commit 8cfd7a7

Browse files
committed
Rename memory hooks
1 parent 50ef22a commit 8cfd7a7

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/machine.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
780780
}
781781

782782
#[inline(always)]
783-
fn memory_read(
783+
fn before_memory_read(
784784
_tcx: TyCtxt<'tcx>,
785785
machine: &Self,
786786
alloc_extra: &AllocExtra,
@@ -796,7 +796,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
796796
)?;
797797
}
798798
if let Some(stacked_borrows) = &alloc_extra.stacked_borrows {
799-
stacked_borrows.borrow_mut().memory_read(
799+
stacked_borrows.borrow_mut().before_memory_read(
800800
alloc_id,
801801
prov_extra,
802802
range,
@@ -812,7 +812,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
812812
}
813813

814814
#[inline(always)]
815-
fn memory_written(
815+
fn before_memory_write(
816816
_tcx: TyCtxt<'tcx>,
817817
machine: &mut Self,
818818
alloc_extra: &mut AllocExtra,
@@ -828,7 +828,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
828828
)?;
829829
}
830830
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
831-
stacked_borrows.get_mut().memory_written(
831+
stacked_borrows.get_mut().before_memory_write(
832832
alloc_id,
833833
prov_extra,
834834
range,
@@ -844,7 +844,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
844844
}
845845

846846
#[inline(always)]
847-
fn memory_deallocated(
847+
fn before_memory_deallocation(
848848
_tcx: TyCtxt<'tcx>,
849849
machine: &mut Self,
850850
alloc_extra: &mut AllocExtra,
@@ -863,7 +863,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
863863
)?;
864864
}
865865
if let Some(stacked_borrows) = &mut alloc_extra.stacked_borrows {
866-
stacked_borrows.get_mut().memory_deallocated(
866+
stacked_borrows.get_mut().before_memory_deallocation(
867867
alloc_id,
868868
prove_extra,
869869
range,

src/stacked_borrows/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ impl Stacks {
657657
}
658658

659659
#[inline(always)]
660-
pub fn memory_read<'tcx>(
660+
pub fn before_memory_read<'tcx>(
661661
&mut self,
662662
alloc_id: AllocId,
663663
tag: ProvenanceExtra,
@@ -688,7 +688,7 @@ impl Stacks {
688688
}
689689

690690
#[inline(always)]
691-
pub fn memory_written<'tcx>(
691+
pub fn before_memory_write<'tcx>(
692692
&mut self,
693693
alloc_id: AllocId,
694694
tag: ProvenanceExtra,
@@ -719,7 +719,7 @@ impl Stacks {
719719
}
720720

721721
#[inline(always)]
722-
pub fn memory_deallocated<'tcx>(
722+
pub fn before_memory_deallocation<'tcx>(
723723
&mut self,
724724
alloc_id: AllocId,
725725
tag: ProvenanceExtra,

0 commit comments

Comments
 (0)