@@ -37,7 +37,7 @@ pub const STACK_ADDR: u64 = 32 * PAGE_SIZE; // not really about the "stack", but
37
37
pub const STACK_SIZE : u64 = 16 * PAGE_SIZE ; // whatever
38
38
39
39
/// Extra data stored with each stack frame
40
- pub struct FrameData < ' tcx > {
40
+ pub struct FrameExtra < ' tcx > {
41
41
/// Extra data for Stacked Borrows.
42
42
pub borrow_tracker : Option < borrow_tracker:: FrameState > ,
43
43
@@ -58,20 +58,20 @@ pub struct FrameData<'tcx> {
58
58
pub is_user_relevant : bool ,
59
59
}
60
60
61
- impl < ' tcx > std:: fmt:: Debug for FrameData < ' tcx > {
61
+ impl < ' tcx > std:: fmt:: Debug for FrameExtra < ' tcx > {
62
62
fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
63
63
// Omitting `timing`, it does not support `Debug`.
64
- let FrameData { borrow_tracker, catch_unwind, timing : _, is_user_relevant : _ } = self ;
64
+ let FrameExtra { borrow_tracker, catch_unwind, timing : _, is_user_relevant : _ } = self ;
65
65
f. debug_struct ( "FrameData" )
66
66
. field ( "borrow_tracker" , borrow_tracker)
67
67
. field ( "catch_unwind" , catch_unwind)
68
68
. finish ( )
69
69
}
70
70
}
71
71
72
- impl VisitTags for FrameData < ' _ > {
72
+ impl VisitTags for FrameExtra < ' _ > {
73
73
fn visit_tags ( & self , visit : & mut dyn FnMut ( BorTag ) ) {
74
- let FrameData { catch_unwind, borrow_tracker, timing : _, is_user_relevant : _ } = self ;
74
+ let FrameExtra { catch_unwind, borrow_tracker, timing : _, is_user_relevant : _ } = self ;
75
75
76
76
catch_unwind. visit_tags ( visit) ;
77
77
borrow_tracker. visit_tags ( visit) ;
@@ -258,10 +258,10 @@ pub struct AllocExtra {
258
258
pub borrow_tracker : Option < borrow_tracker:: AllocState > ,
259
259
/// Data race detection via the use of a vector-clock,
260
260
/// this is only added if it is enabled.
261
- pub data_race : Option < data_race:: AllocExtra > ,
261
+ pub data_race : Option < data_race:: AllocState > ,
262
262
/// Weak memory emulation via the use of store buffers,
263
263
/// this is only added if it is enabled.
264
- pub weak_memory : Option < weak_memory:: AllocExtra > ,
264
+ pub weak_memory : Option < weak_memory:: AllocState > ,
265
265
}
266
266
267
267
impl VisitTags for AllocExtra {
@@ -736,7 +736,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
736
736
type MemoryKind = MiriMemoryKind ;
737
737
type ExtraFnVal = Dlsym ;
738
738
739
- type FrameExtra = FrameData < ' tcx > ;
739
+ type FrameExtra = FrameExtra < ' tcx > ;
740
740
type AllocExtra = AllocExtra ;
741
741
742
742
type Provenance = Provenance ;
@@ -908,14 +908,14 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
908
908
. map ( |bt| bt. borrow_mut ( ) . new_allocation ( id, alloc. size ( ) , kind, & ecx. machine ) ) ;
909
909
910
910
let race_alloc = ecx. machine . data_race . as_ref ( ) . map ( |data_race| {
911
- data_race:: AllocExtra :: new_allocation (
911
+ data_race:: AllocState :: new_allocation (
912
912
data_race,
913
913
& ecx. machine . threads ,
914
914
alloc. size ( ) ,
915
915
kind,
916
916
)
917
917
} ) ;
918
- let buffer_alloc = ecx. machine . weak_memory . then ( weak_memory:: AllocExtra :: new_allocation) ;
918
+ let buffer_alloc = ecx. machine . weak_memory . then ( weak_memory:: AllocState :: new_allocation) ;
919
919
let alloc: Allocation < Provenance , Self :: AllocExtra > = alloc. adjust_from_tcx (
920
920
& ecx. tcx ,
921
921
AllocExtra { borrow_tracker, data_race : race_alloc, weak_memory : buffer_alloc } ,
@@ -1070,7 +1070,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
1070
1070
fn init_frame_extra (
1071
1071
ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
1072
1072
frame : Frame < ' mir , ' tcx , Provenance > ,
1073
- ) -> InterpResult < ' tcx , Frame < ' mir , ' tcx , Provenance , FrameData < ' tcx > > > {
1073
+ ) -> InterpResult < ' tcx , Frame < ' mir , ' tcx , Provenance , FrameExtra < ' tcx > > > {
1074
1074
// Start recording our event before doing anything else
1075
1075
let timing = if let Some ( profiler) = ecx. machine . profiler . as_ref ( ) {
1076
1076
let fn_name = frame. instance . to_string ( ) ;
@@ -1088,7 +1088,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
1088
1088
1089
1089
let borrow_tracker = ecx. machine . borrow_tracker . as_ref ( ) ;
1090
1090
1091
- let extra = FrameData {
1091
+ let extra = FrameExtra {
1092
1092
borrow_tracker : borrow_tracker. map ( |bt| bt. borrow_mut ( ) . new_frame ( & ecx. machine ) ) ,
1093
1093
catch_unwind : None ,
1094
1094
timing,
@@ -1157,7 +1157,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
1157
1157
#[ inline( always) ]
1158
1158
fn after_stack_pop (
1159
1159
ecx : & mut InterpCx < ' mir , ' tcx , Self > ,
1160
- mut frame : Frame < ' mir , ' tcx , Provenance , FrameData < ' tcx > > ,
1160
+ mut frame : Frame < ' mir , ' tcx , Provenance , FrameExtra < ' tcx > > ,
1161
1161
unwinding : bool ,
1162
1162
) -> InterpResult < ' tcx , StackPopJump > {
1163
1163
if frame. extra . is_user_relevant {
0 commit comments