diff options
| author | Will Crichton <wcrichto@cs.stanford.edu> | 2024-12-12 12:34:43 -0800 |
|---|---|---|
| committer | Will Crichton <wcrichto@cs.stanford.edu> | 2024-12-12 12:34:43 -0800 |
| commit | 4d5d4700f3c7fa5151560d27f389c15a7a3047a0 (patch) | |
| tree | 1b24998fd6c7429ea5201da9b9cf31571e1a6561 /compiler/rustc_const_eval/src | |
| parent | eb10db0a76fdacdbe6747431aea90f17ce4ec7c1 (diff) | |
| download | rust-4d5d4700f3c7fa5151560d27f389c15a7a3047a0.tar.gz rust-4d5d4700f3c7fa5151560d27f389c15a7a3047a0.zip | |
Make BorrowSet/BorrowData fields accessible via public getters
Diffstat (limited to 'compiler/rustc_const_eval/src')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/machine.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operand.rs | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/machine.rs b/compiler/rustc_const_eval/src/interpret/machine.rs index a180d5da941..9ac2a024ccf 100644 --- a/compiler/rustc_const_eval/src/interpret/machine.rs +++ b/compiler/rustc_const_eval/src/interpret/machine.rs @@ -540,10 +540,14 @@ pub trait Machine<'tcx>: Sized { interp_ok(ReturnAction::Normal) } - /// Called immediately after an "immediate" local variable is read + /// Called immediately after an "immediate" local variable is read in a given frame /// (i.e., this is called for reads that do not end up accessing addressable memory). #[inline(always)] - fn after_local_read(_ecx: &InterpCx<'tcx, Self>, _local: mir::Local) -> InterpResult<'tcx> { + fn after_local_read( + _ecx: &InterpCx<'tcx, Self>, + _frame: &Frame<'tcx, Self::Provenance, Self::FrameExtra>, + _local: mir::Local, + ) -> InterpResult<'tcx> { interp_ok(()) } diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs index bd33e8d20c0..9d2a7125f51 100644 --- a/compiler/rustc_const_eval/src/interpret/operand.rs +++ b/compiler/rustc_const_eval/src/interpret/operand.rs @@ -718,9 +718,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { /// Read from a local of a given frame. /// Will not access memory, instead an indirect `Operand` is returned. /// - /// This is public because it is used by [priroda](https://github.com/oli-obk/priroda) and - /// [Aquascope](https://github.com/cognitive-engineering-lab/aquascope/) to get an - /// OpTy from a local. + /// This is public because it is used by [Aquascope](https://github.com/cognitive-engineering-lab/aquascope/) + /// to get an OpTy from a local. pub fn local_at_frame_to_op( &self, frame: &Frame<'tcx, M::Provenance, M::FrameExtra>, @@ -732,7 +731,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { if matches!(op, Operand::Immediate(_)) { assert!(!layout.is_unsized()); } - M::after_local_read(self, local)?; + M::after_local_read(self, frame, local)?; interp_ok(OpTy { op, layout }) } |
