1
- use rustc_index:: bit_set:: { BitSet , ChunkedBitSet } ;
1
+ use rustc_index:: bit_set:: BitSet ;
2
2
use rustc_index:: Idx ;
3
3
use rustc_middle:: mir:: { self , Body , CallReturnPlaces , Location , TerminatorEdges } ;
4
4
use rustc_middle:: ty:: { self , TyCtxt } ;
@@ -68,7 +68,7 @@ impl<'a, 'tcx> MaybeInitializedPlaces<'a, 'tcx> {
68
68
pub fn is_unwind_dead (
69
69
& self ,
70
70
place : mir:: Place < ' tcx > ,
71
- state : & MaybeReachable < ChunkedBitSet < MovePathIndex > > ,
71
+ state : & MaybeReachable < BitSet < MovePathIndex > > ,
72
72
) -> bool {
73
73
if let LookupResult :: Exact ( path) = self . move_data ( ) . rev_lookup . find ( place. as_ref ( ) ) {
74
74
let mut maybe_live = false ;
@@ -308,7 +308,7 @@ impl<'a, 'tcx> DefinitelyInitializedPlaces<'a, 'tcx> {
308
308
}
309
309
310
310
impl < ' tcx > AnalysisDomain < ' tcx > for MaybeInitializedPlaces < ' _ , ' tcx > {
311
- type Domain = MaybeReachable < ChunkedBitSet < MovePathIndex > > ;
311
+ type Domain = MaybeReachable < BitSet < MovePathIndex > > ;
312
312
const NAME : & ' static str = "maybe_init" ;
313
313
314
314
fn bottom_value ( & self , _: & mir:: Body < ' tcx > ) -> Self :: Domain {
@@ -317,8 +317,7 @@ impl<'tcx> AnalysisDomain<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
317
317
}
318
318
319
319
fn initialize_start_block ( & self , _: & mir:: Body < ' tcx > , state : & mut Self :: Domain ) {
320
- * state =
321
- MaybeReachable :: Reachable ( ChunkedBitSet :: new_empty ( self . move_data ( ) . move_paths . len ( ) ) ) ;
320
+ * state = MaybeReachable :: Reachable ( BitSet :: new_empty ( self . move_data ( ) . move_paths . len ( ) ) ) ;
322
321
drop_flag_effects_for_function_entry ( self . tcx , self . body , self . mdpe , |path, s| {
323
322
assert ! ( s == DropFlagState :: Present ) ;
324
323
state. gen ( path) ;
@@ -444,13 +443,13 @@ impl<'tcx> GenKillAnalysis<'tcx> for MaybeInitializedPlaces<'_, 'tcx> {
444
443
}
445
444
446
445
impl < ' tcx > AnalysisDomain < ' tcx > for MaybeUninitializedPlaces < ' _ , ' tcx > {
447
- type Domain = ChunkedBitSet < MovePathIndex > ;
446
+ type Domain = BitSet < MovePathIndex > ;
448
447
449
448
const NAME : & ' static str = "maybe_uninit" ;
450
449
451
450
fn bottom_value ( & self , _: & mir:: Body < ' tcx > ) -> Self :: Domain {
452
451
// bottom = initialized (start_block_effect counters this at outset)
453
- ChunkedBitSet :: new_empty ( self . move_data ( ) . move_paths . len ( ) )
452
+ BitSet :: new_empty ( self . move_data ( ) . move_paths . len ( ) )
454
453
}
455
454
456
455
// sets on_entry bits for Arg places
@@ -649,13 +648,13 @@ impl<'tcx> GenKillAnalysis<'tcx> for DefinitelyInitializedPlaces<'_, 'tcx> {
649
648
}
650
649
651
650
impl < ' tcx > AnalysisDomain < ' tcx > for EverInitializedPlaces < ' _ , ' tcx > {
652
- type Domain = ChunkedBitSet < InitIndex > ;
651
+ type Domain = BitSet < InitIndex > ;
653
652
654
653
const NAME : & ' static str = "ever_init" ;
655
654
656
655
fn bottom_value ( & self , _: & mir:: Body < ' tcx > ) -> Self :: Domain {
657
656
// bottom = no initialized variables by default
658
- ChunkedBitSet :: new_empty ( self . move_data ( ) . inits . len ( ) )
657
+ BitSet :: new_empty ( self . move_data ( ) . inits . len ( ) )
659
658
}
660
659
661
660
fn initialize_start_block ( & self , body : & mir:: Body < ' tcx > , state : & mut Self :: Domain ) {
0 commit comments