Skip to content

Commit a6d792d

Browse files
committed
rename panic_paylods → unwind_payloads
1 parent 9d77dd8 commit a6d792d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/concurrency/thread.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ pub struct Thread<'tcx> {
186186
/// The join status.
187187
join_status: ThreadJoinStatus,
188188

189-
/// Stack of active panic payloads for the current thread. Used for storing
190-
/// the argument of the call to `miri_start_unwind` (the panic payload) when unwinding.
189+
/// Stack of active unwind payloads for the current thread. Used for storing
190+
/// the argument of the call to `miri_start_unwind` (the payload) when unwinding.
191191
/// This is pointer-sized, and matches the `Payload` type in `src/libpanic_unwind/miri.rs`.
192192
///
193193
/// In real unwinding, the payload gets passed as an argument to the landing pad,
194194
/// which then forwards it to 'Resume'. However this argument is implicit in MIR,
195195
/// so we have to store it out-of-band. When there are multiple active unwinds,
196196
/// the innermost one is always caught first, so we can store them as a stack.
197-
pub(crate) panic_payloads: Vec<ImmTy<'tcx>>,
197+
pub(crate) unwind_payloads: Vec<ImmTy<'tcx>>,
198198

199199
/// Last OS error location in memory. It is a 32-bit integer.
200200
pub(crate) last_error: Option<MPlaceTy<'tcx>>,
@@ -282,7 +282,7 @@ impl<'tcx> Thread<'tcx> {
282282
stack: Vec::new(),
283283
top_user_relevant_frame: None,
284284
join_status: ThreadJoinStatus::Joinable,
285-
panic_payloads: Vec::new(),
285+
unwind_payloads: Vec::new(),
286286
last_error: None,
287287
on_stack_empty,
288288
}
@@ -292,7 +292,7 @@ impl<'tcx> Thread<'tcx> {
292292
impl VisitProvenance for Thread<'_> {
293293
fn visit_provenance(&self, visit: &mut VisitWith<'_>) {
294294
let Thread {
295-
panic_payloads: panic_payload,
295+
unwind_payloads: panic_payload,
296296
last_error,
297297
stack,
298298
top_user_relevant_frame: _,

src/shims/panic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
5151

5252
let payload = this.read_immediate(payload)?;
5353
let thread = this.active_thread_mut();
54-
thread.panic_payloads.push(payload);
54+
thread.unwind_payloads.push(payload);
5555

5656
interp_ok(())
5757
}
@@ -132,7 +132,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
132132

133133
// The Thread's `panic_payload` holds what was passed to `miri_start_unwind`.
134134
// This is exactly the second argument we need to pass to `catch_fn`.
135-
let payload = this.active_thread_mut().panic_payloads.pop().unwrap();
135+
let payload = this.active_thread_mut().unwind_payloads.pop().unwrap();
136136

137137
// Push the `catch_fn` stackframe.
138138
let f_instance = this.get_ptr_fn(catch_unwind.catch_fn)?.as_instance()?;

0 commit comments

Comments
 (0)