@@ -37,8 +37,6 @@ pub struct Stacks {
37
37
history : AllocHistory ,
38
38
/// The set of tags that have been exposed inside this allocation.
39
39
exposed_tags : FxHashSet < BorTag > ,
40
- /// Whether this memory has been modified since the last time the tag GC ran
41
- modified_since_last_gc : bool ,
42
40
}
43
41
44
42
/// Indicates which permissions to grant to the retagged pointer.
@@ -450,15 +448,10 @@ impl<'tcx> Stack {
450
448
/// Integration with the BorTag garbage collector
451
449
impl Stacks {
452
450
pub fn remove_unreachable_tags ( & mut self , live_tags : & FxHashSet < BorTag > ) {
453
- if self . modified_since_last_gc {
454
- for ( _stack_range, stack) in self . stacks . iter_mut_all ( ) {
455
- if stack. len ( ) > 64 {
456
- stack. retain ( live_tags) ;
457
- }
458
- }
459
- self . history . retain ( live_tags) ;
460
- self . modified_since_last_gc = false ;
451
+ for ( _stack_range, stack) in self . stacks . iter_mut_all ( ) {
452
+ stack. retain ( live_tags) ;
461
453
}
454
+ self . history . retain ( live_tags) ;
462
455
}
463
456
}
464
457
@@ -488,7 +481,6 @@ impl<'tcx> Stacks {
488
481
stacks : RangeMap :: new ( size, stack) ,
489
482
history : AllocHistory :: new ( id, item, machine) ,
490
483
exposed_tags : FxHashSet :: default ( ) ,
491
- modified_since_last_gc : false ,
492
484
}
493
485
}
494
486
@@ -503,7 +495,6 @@ impl<'tcx> Stacks {
503
495
& mut FxHashSet < BorTag > ,
504
496
) -> InterpResult < ' tcx > ,
505
497
) -> InterpResult < ' tcx > {
506
- self . modified_since_last_gc = true ;
507
498
for ( stack_range, stack) in self . stacks . iter_mut ( range. start , range. size ) {
508
499
let mut dcx = dcx_builder. build ( & mut self . history , Size :: from_bytes ( stack_range. start ) ) ;
509
500
f ( stack, & mut dcx, & mut self . exposed_tags ) ?;
0 commit comments