Add doc comment

This commit is contained in:
Aaron Hill 2019-10-20 21:40:38 -04:00
parent 64a43f45d2
commit fe3e1c1cc3
No known key found for this signature in database
GPG Key ID: B4087E510E98B164

View File

@ -551,6 +551,19 @@ pub fn push_stack_frame(
}
}
/// Pops the current frame from the stack, deallocating the
/// memory for allocated locals.
///
/// If `unwinding` is `false`, then we are performing a normal return
/// from a function. In this case, we jump back into the frame of the caller,
/// and continue execution as normal.
///
/// If `unwinding` is `true`, then we are in the middle of a panic,
/// and need to unwind this frame. In this case, we jump to the
/// `cleanup` block for the function, which is responsible for running
/// `Drop` impls for any locals that have been initialized at this point.
/// The cleanup block ends with a special `Resume` terminator, which will
/// cause us to continue unwinding where we left off.
pub(super) fn pop_stack_frame(
&mut self,
unwinding: bool