@@ -44,7 +44,7 @@ pub const NUM_CPUS: u64 = 1;
44
44
/// Extra data stored with each stack frame
45
45
pub struct FrameData < ' tcx > {
46
46
/// Extra data for Stacked Borrows.
47
- pub call_id : stacked_borrows:: CallId ,
47
+ pub stacked_borrows : stacked_borrows:: FrameExtra ,
48
48
49
49
/// If this is Some(), then this is a special "catch unwind" frame (the frame of `try_fn`
50
50
/// called by `try`). When this frame is popped during unwinding a panic,
@@ -55,26 +55,15 @@ pub struct FrameData<'tcx> {
55
55
/// for the start of this frame. When we finish executing this frame,
56
56
/// we use this to register a completed event with `measureme`.
57
57
pub timing : Option < measureme:: DetachedTiming > ,
58
-
59
- /// If this frame is protecting any tags, they are listed here. We use this list to do
60
- /// incremental updates of the global list of protected tags stored in the
61
- /// `stacked_borrows::GlobalState` upon function return, and if we attempt to pop a protected
62
- /// tag, to identify which call is responsible for protecting the tag.
63
- /// See `Stack::item_popped` for more explanation.
64
- ///
65
- /// This will contain one tag per reference passed to the function, so
66
- /// a size of 2 is enough for the vast majority of functions.
67
- pub protected_tags : SmallVec < [ SbTag ; 2 ] > ,
68
58
}
69
59
70
60
impl < ' tcx > std:: fmt:: Debug for FrameData < ' tcx > {
71
61
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
72
62
// Omitting `timing`, it does not support `Debug`.
73
- let FrameData { call_id , catch_unwind, timing : _, protected_tags } = self ;
63
+ let FrameData { stacked_borrows , catch_unwind, timing : _ } = self ;
74
64
f. debug_struct ( "FrameData" )
75
- . field ( "call_id " , call_id )
65
+ . field ( "stacked_borrows " , stacked_borrows )
76
66
. field ( "catch_unwind" , catch_unwind)
77
- . field ( "protected_tags" , protected_tags)
78
67
. finish ( )
79
68
}
80
69
}
@@ -907,8 +896,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'mir, 'tcx> {
907
896
stacked_borrows. borrow_mut ( ) . new_call ( )
908
897
} ) ;
909
898
910
- let extra =
911
- FrameData { call_id, catch_unwind : None , timing, protected_tags : SmallVec :: new ( ) } ;
899
+ let extra = FrameData {
900
+ stacked_borrows : stacked_borrows:: FrameExtra {
901
+ call_id,
902
+ protected_tags : SmallVec :: new ( ) ,
903
+ } ,
904
+ catch_unwind : None ,
905
+ timing,
906
+ } ;
912
907
Ok ( frame. with_extra ( extra) )
913
908
}
914
909
0 commit comments