@@ -331,13 +331,12 @@ impl<'a, 'gcx, 'tcx> BitDenotation for MaybeInitializedLvals<'a, 'gcx, 'tcx> {
331
331
self . move_data ( ) . move_paths . len ( )
332
332
}
333
333
334
- fn start_block_effect ( & self , sets : & mut BlockSets < MovePathIndex > )
335
- {
334
+ fn start_block_effect ( & self , entry_set : & mut IdxSet < MovePathIndex > ) {
336
335
drop_flag_effects_for_function_entry (
337
336
self . tcx , self . mir , self . mdpe ,
338
337
|path, s| {
339
338
assert ! ( s == DropFlagState :: Present ) ;
340
- sets . on_entry . add ( & path) ;
339
+ entry_set . add ( & path) ;
341
340
} ) ;
342
341
}
343
342
@@ -384,15 +383,15 @@ impl<'a, 'gcx, 'tcx> BitDenotation for MaybeUninitializedLvals<'a, 'gcx, 'tcx> {
384
383
}
385
384
386
385
// sets on_entry bits for Arg places
387
- fn start_block_effect ( & self , sets : & mut BlockSets < MovePathIndex > ) {
386
+ fn start_block_effect ( & self , entry_set : & mut IdxSet < MovePathIndex > ) {
388
387
// set all bits to 1 (uninit) before gathering counterevidence
389
- for e in sets . on_entry . words_mut ( ) { * e = !0 ; }
388
+ for e in entry_set . words_mut ( ) { * e = !0 ; }
390
389
391
390
drop_flag_effects_for_function_entry (
392
391
self . tcx , self . mir , self . mdpe ,
393
392
|path, s| {
394
393
assert ! ( s == DropFlagState :: Present ) ;
395
- sets . on_entry . remove ( & path) ;
394
+ entry_set . remove ( & path) ;
396
395
} ) ;
397
396
}
398
397
@@ -439,14 +438,14 @@ impl<'a, 'gcx, 'tcx> BitDenotation for DefinitelyInitializedLvals<'a, 'gcx, 'tcx
439
438
}
440
439
441
440
// sets on_entry bits for Arg places
442
- fn start_block_effect ( & self , sets : & mut BlockSets < MovePathIndex > ) {
443
- for e in sets . on_entry . words_mut ( ) { * e = 0 ; }
441
+ fn start_block_effect ( & self , entry_set : & mut IdxSet < MovePathIndex > ) {
442
+ for e in entry_set . words_mut ( ) { * e = 0 ; }
444
443
445
444
drop_flag_effects_for_function_entry (
446
445
self . tcx , self . mir , self . mdpe ,
447
446
|path, s| {
448
447
assert ! ( s == DropFlagState :: Present ) ;
449
- sets . on_entry . add ( & path) ;
448
+ entry_set . add ( & path) ;
450
449
} ) ;
451
450
}
452
451
@@ -492,10 +491,11 @@ impl<'a, 'gcx, 'tcx> BitDenotation for MovingOutStatements<'a, 'gcx, 'tcx> {
492
491
self . move_data ( ) . moves . len ( )
493
492
}
494
493
495
- fn start_block_effect ( & self , _sets : & mut BlockSets < MoveOutIndex > ) {
494
+ fn start_block_effect ( & self , _sets : & mut IdxSet < MoveOutIndex > ) {
496
495
// no move-statements have been executed prior to function
497
496
// execution, so this method has no effect on `_sets`.
498
497
}
498
+
499
499
fn statement_effect ( & self ,
500
500
sets : & mut BlockSets < MoveOutIndex > ,
501
501
location : Location ) {
@@ -568,9 +568,12 @@ impl<'a, 'gcx, 'tcx> BitDenotation for EverInitializedLvals<'a, 'gcx, 'tcx> {
568
568
self . move_data ( ) . inits . len ( )
569
569
}
570
570
571
- fn start_block_effect ( & self , sets : & mut BlockSets < InitIndex > ) {
572
- sets. gen_all ( ( 0 ..self . mir . arg_count ) . map ( InitIndex :: new) ) ;
571
+ fn start_block_effect ( & self , entry_set : & mut IdxSet < InitIndex > ) {
572
+ for arg_init in 0 ..self . mir . arg_count {
573
+ entry_set. add ( & InitIndex :: new ( arg_init) ) ;
574
+ }
573
575
}
576
+
574
577
fn statement_effect ( & self ,
575
578
sets : & mut BlockSets < InitIndex > ,
576
579
location : Location ) {
0 commit comments