Do renames proposed by review
This commit is contained in:
parent
236352024b
commit
dd5a447b5a
@ -160,7 +160,7 @@ pub enum StackPopCleanup {
|
||||
}
|
||||
|
||||
/// Return type of [`InterpCx::pop_stack_frame`].
|
||||
pub struct StackPop<'tcx, Prov: Provenance> {
|
||||
pub struct StackPopInfo<'tcx, Prov: Provenance> {
|
||||
/// Additional information about the action to be performed when returning from the popped
|
||||
/// stack frame.
|
||||
pub return_action: ReturnAction,
|
||||
@ -890,7 +890,7 @@ fn after_stack_frame_push(
|
||||
pub fn pop_stack_frame(
|
||||
&mut self,
|
||||
unwinding: bool,
|
||||
) -> InterpResult<'tcx, StackPop<'tcx, M::Provenance>> {
|
||||
) -> InterpResult<'tcx, StackPopInfo<'tcx, M::Provenance>> {
|
||||
let cleanup = self.cleanup_current_frame_locals()?;
|
||||
|
||||
let frame =
|
||||
@ -905,7 +905,7 @@ pub fn pop_stack_frame(
|
||||
ReturnAction::NoCleanup
|
||||
};
|
||||
|
||||
Ok(StackPop { return_action, return_to_block, return_place })
|
||||
Ok(StackPopInfo { return_action, return_to_block, return_place })
|
||||
}
|
||||
|
||||
/// A private helper for [`pop_stack_frame`](InterpCx::pop_stack_frame).
|
||||
@ -1043,12 +1043,12 @@ pub(super) fn return_from_current_stack_frame(
|
||||
};
|
||||
|
||||
// All right, now it is time to actually pop the frame.
|
||||
let frame = self.pop_stack_frame(unwinding)?;
|
||||
let stack_pop_info = self.pop_stack_frame(unwinding)?;
|
||||
|
||||
// Report error from return value copy, if any.
|
||||
copy_ret_result?;
|
||||
|
||||
match frame.return_action {
|
||||
match stack_pop_info.return_action {
|
||||
ReturnAction::Normal => {}
|
||||
ReturnAction::NoJump => {
|
||||
// The hook already did everything.
|
||||
@ -1066,7 +1066,7 @@ pub(super) fn return_from_current_stack_frame(
|
||||
// Normal return, figure out where to jump.
|
||||
if unwinding {
|
||||
// Follow the unwind edge.
|
||||
let unwind = match frame.return_to_block {
|
||||
let unwind = match stack_pop_info.return_to_block {
|
||||
StackPopCleanup::Goto { unwind, .. } => unwind,
|
||||
StackPopCleanup::Root { .. } => {
|
||||
panic!("encountered StackPopCleanup::Root when unwinding!")
|
||||
@ -1076,7 +1076,7 @@ pub(super) fn return_from_current_stack_frame(
|
||||
self.unwind_to_block(unwind)
|
||||
} else {
|
||||
// Follow the normal return edge.
|
||||
match frame.return_to_block {
|
||||
match stack_pop_info.return_to_block {
|
||||
StackPopCleanup::Goto { ret, .. } => self.return_to_block(ret),
|
||||
StackPopCleanup::Root { .. } => {
|
||||
assert!(
|
||||
|
@ -27,7 +27,7 @@
|
||||
};
|
||||
use crate::{
|
||||
fluent_generated as fluent,
|
||||
interpret::{eval_context::StackPop, ReturnAction},
|
||||
interpret::{eval_context::StackPopInfo, ReturnAction},
|
||||
};
|
||||
|
||||
/// An argment passed to a function.
|
||||
@ -982,7 +982,7 @@ pub(crate) fn eval_fn_tail_call(
|
||||
// only the tail called function should return to the current return block.
|
||||
M::before_stack_pop(self, self.frame())?;
|
||||
|
||||
let StackPop { return_action, return_to_block, return_place } =
|
||||
let StackPopInfo { return_action, return_to_block, return_place } =
|
||||
self.pop_stack_frame(false)?;
|
||||
|
||||
assert_eq!(return_action, ReturnAction::Normal);
|
||||
|
Loading…
Reference in New Issue
Block a user