@@ -147,7 +147,7 @@ pub enum Provenance {
147147 Concrete {
148148 alloc_id : AllocId ,
149149 /// Stacked Borrows tag.
150- sb : SbTag ,
150+ tag : BorTag ,
151151 } ,
152152 Wildcard ,
153153}
@@ -173,7 +173,7 @@ impl std::hash::Hash for Provenance {
173173/// The "extra" information a pointer has over a regular AllocId.
174174#[ derive( Copy , Clone , PartialEq ) ]
175175pub enum ProvenanceExtra {
176- Concrete ( SbTag ) ,
176+ Concrete ( BorTag ) ,
177177 Wildcard ,
178178}
179179
@@ -188,15 +188,15 @@ static_assert_size!(Scalar<Provenance>, 32);
188188impl fmt:: Debug for Provenance {
189189 fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
190190 match self {
191- Provenance :: Concrete { alloc_id, sb } => {
191+ Provenance :: Concrete { alloc_id, tag } => {
192192 // Forward `alternate` flag to `alloc_id` printing.
193193 if f. alternate ( ) {
194194 write ! ( f, "[{alloc_id:#?}]" ) ?;
195195 } else {
196196 write ! ( f, "[{alloc_id:?}]" ) ?;
197197 }
198198 // Print Stacked Borrows tag.
199- write ! ( f, "{sb :?}" ) ?;
199+ write ! ( f, "{tag :?}" ) ?;
200200 }
201201 Provenance :: Wildcard => {
202202 write ! ( f, "[wildcard]" ) ?;
@@ -221,9 +221,9 @@ impl interpret::Provenance for Provenance {
221221 match ( left, right) {
222222 // If both are the *same* concrete tag, that is the result.
223223 (
224- Some ( Provenance :: Concrete { alloc_id : left_alloc, sb : left_sb } ) ,
225- Some ( Provenance :: Concrete { alloc_id : right_alloc, sb : right_sb } ) ,
226- ) if left_alloc == right_alloc && left_sb == right_sb => left,
224+ Some ( Provenance :: Concrete { alloc_id : left_alloc, tag : left_tag } ) ,
225+ Some ( Provenance :: Concrete { alloc_id : right_alloc, tag : right_tag } ) ,
226+ ) if left_alloc == right_alloc && left_tag == right_tag => left,
227227 // If one side is a wildcard, the best possible outcome is that it is equal to the other
228228 // one, and we use that.
229229 ( Some ( Provenance :: Wildcard ) , o) | ( o, Some ( Provenance :: Wildcard ) ) => o,
@@ -243,7 +243,7 @@ impl fmt::Debug for ProvenanceExtra {
243243}
244244
245245impl ProvenanceExtra {
246- pub fn and_then < T > ( self , f : impl FnOnce ( SbTag ) -> Option < T > ) -> Option < T > {
246+ pub fn and_then < T > ( self , f : impl FnOnce ( BorTag ) -> Option < T > ) -> Option < T > {
247247 match self {
248248 ProvenanceExtra :: Concrete ( pid) => f ( pid) ,
249249 ProvenanceExtra :: Wildcard => None ,
@@ -463,9 +463,9 @@ pub struct MiriMachine<'mir, 'tcx> {
463463 #[ cfg( not( target_os = "linux" ) ) ]
464464 pub external_so_lib : Option < !> ,
465465
466- /// Run a garbage collector for SbTags every N basic blocks.
466+ /// Run a garbage collector for BorTags every N basic blocks.
467467 pub ( crate ) gc_interval : u32 ,
468- /// The number of blocks that passed since the last SbTag GC pass.
468+ /// The number of blocks that passed since the last BorTag GC pass.
469469 pub ( crate ) since_gc : u32 ,
470470 /// The number of CPUs to be reported by miri.
471471 pub ( crate ) num_cpus : u32 ,
@@ -656,7 +656,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
656656}
657657
658658impl VisitTags for MiriMachine < ' _ , ' _ > {
659- fn visit_tags ( & self , visit : & mut dyn FnMut ( SbTag ) ) {
659+ fn visit_tags ( & self , visit : & mut dyn FnMut ( BorTag ) ) {
660660 #[ rustfmt:: skip]
661661 let MiriMachine {
662662 threads,
@@ -959,10 +959,10 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
959959 stacked_borrows. borrow_mut ( ) . base_ptr_tag ( ptr. provenance , & ecx. machine )
960960 } else {
961961 // Value does not matter, SB is disabled
962- SbTag :: default ( )
962+ BorTag :: default ( )
963963 } ;
964964 Pointer :: new (
965- Provenance :: Concrete { alloc_id : ptr. provenance , sb : sb_tag } ,
965+ Provenance :: Concrete { alloc_id : ptr. provenance , tag } ,
966966 Size :: from_bytes ( absolute_addr) ,
967967 )
968968 }
@@ -980,8 +980,8 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
980980 ptr : Pointer < Self :: Provenance > ,
981981 ) -> InterpResult < ' tcx > {
982982 match ptr. provenance {
983- Provenance :: Concrete { alloc_id, sb } =>
984- intptrcast:: GlobalStateInner :: expose_ptr ( ecx, alloc_id, sb ) ,
983+ Provenance :: Concrete { alloc_id, tag } =>
984+ intptrcast:: GlobalStateInner :: expose_ptr ( ecx, alloc_id, tag ) ,
985985 Provenance :: Wildcard => {
986986 // No need to do anything for wildcard pointers as
987987 // their provenances have already been previously exposed.
@@ -999,11 +999,11 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
999999 let rel = intptrcast:: GlobalStateInner :: abs_ptr_to_rel ( ecx, ptr) ;
10001000
10011001 rel. map ( |( alloc_id, size) | {
1002- let sb = match ptr. provenance {
1003- Provenance :: Concrete { sb , .. } => ProvenanceExtra :: Concrete ( sb ) ,
1002+ let tag = match ptr. provenance {
1003+ Provenance :: Concrete { tag , .. } => ProvenanceExtra :: Concrete ( tag ) ,
10041004 Provenance :: Wildcard => ProvenanceExtra :: Wildcard ,
10051005 } ;
1006- ( alloc_id, size, sb )
1006+ ( alloc_id, size, tag )
10071007 } )
10081008 }
10091009
0 commit comments