about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-02-27 14:18:38 +0100
committerRalf Jung <post@ralfj.de>2025-02-27 14:18:38 +0100
commitac2ddc14af00f2b37e0ba499b35ef31e681aa2ff (patch)
tree8359fe7ce017c3eb33c3e3d8801b66b389f48fbf
parent5e4c582b3e125c1260d05609aee276155b0e9b72 (diff)
downloadrust-ac2ddc14af00f2b37e0ba499b35ef31e681aa2ff.tar.gz
rust-ac2ddc14af00f2b37e0ba499b35ef31e681aa2ff.zip
before_terminator: add some minor clarifying comments
-rw-r--r--src/tools/miri/src/machine.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs
index 4ece8f7895d..45764b70dfb 100644
--- a/src/tools/miri/src/machine.rs
+++ b/src/tools/miri/src/machine.rs
@@ -1532,7 +1532,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
     fn before_terminator(ecx: &mut InterpCx<'tcx, Self>) -> InterpResult<'tcx> {
         ecx.machine.basic_block_count += 1u64; // a u64 that is only incremented by 1 will "never" overflow
         ecx.machine.since_gc += 1;
-        // Possibly report our progress.
+        // Possibly report our progress. This will point at the terminator we are about to execute.
         if let Some(report_progress) = ecx.machine.report_progress {
             if ecx.machine.basic_block_count % u64::from(report_progress) == 0 {
                 ecx.emit_diagnostic(NonHaltingDiagnostic::ProgressReport {
@@ -1551,6 +1551,7 @@ impl<'tcx> Machine<'tcx> for MiriMachine<'tcx> {
         }
 
         // These are our preemption points.
+        // (This will only take effect after the terminator has been executed.)
         ecx.maybe_preempt_active_thread();
 
         // Make sure some time passes.