@@ -56,7 +56,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
5656 interp_ok ( ( ) )
5757 }
5858
59- /// Handles the `try ` intrinsic, the underlying implementation of `std::panicking::try` .
59+ /// Handles the `catch_unwind ` intrinsic.
6060 fn handle_catch_unwind (
6161 & mut self ,
6262 args : & [ OpTy < ' tcx > ] ,
@@ -66,7 +66,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
6666 let this = self . eval_context_mut ( ) ;
6767
6868 // Signature:
69- // fn r#try (try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32
69+ // fn catch_unwind (try_fn: fn(*mut u8), data: *mut u8, catch_fn: fn(*mut u8, *mut u8)) -> i32
7070 // Calls `try_fn` with `data` as argument. If that executes normally, returns 0.
7171 // If that unwinds, calls `catch_fn` with the first argument being `data` and
7272 // then second argument being a target-dependent `payload` (i.e. it is up to us to define
@@ -120,14 +120,14 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
120120 // We only care about `catch_panic` if we're unwinding - if we're doing a normal
121121 // return, then we don't need to do anything special.
122122 if let ( true , Some ( catch_unwind) ) = ( unwinding, extra. catch_unwind . take ( ) ) {
123- // We've just popped a frame that was pushed by `try `,
123+ // We've just popped a frame that was pushed by `catch_unwind `,
124124 // and we are unwinding, so we should catch that.
125125 trace ! (
126126 "unwinding: found catch_panic frame during unwinding: {:?}" ,
127127 this. frame( ) . instance( )
128128 ) ;
129129
130- // We set the return value of `try ` to 1, since there was a panic.
130+ // We set the return value of `catch_unwind ` to 1, since there was a panic.
131131 this. write_scalar ( Scalar :: from_i32 ( 1 ) , & catch_unwind. dest ) ?;
132132
133133 // The Thread's `panic_payload` holds what was passed to `miri_start_unwind`.
@@ -142,7 +142,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
142142 ExternAbi :: Rust ,
143143 & [ catch_unwind. data , payload] ,
144144 None ,
145- // Directly return to caller of `try `.
145+ // Directly return to caller of `catch_unwind `.
146146 StackPopCleanup :: Goto {
147147 ret : catch_unwind. ret ,
148148 // `catch_fn` must not unwind.
0 commit comments