@@ -431,21 +431,22 @@ impl TraverseCoverageGraphWithLoops {
431
431
) ;
432
432
433
433
while let Some ( context) = self . context_stack . last_mut ( ) {
434
- if let Some ( next_bcb ) = context. worklist . pop ( ) {
435
- if !self . visited . insert ( next_bcb ) {
436
- debug ! ( "Already visited: {:?}" , next_bcb ) ;
434
+ if let Some ( bcb ) = context. worklist . pop ( ) {
435
+ if !self . visited . insert ( bcb ) {
436
+ debug ! ( "Already visited: {bcb :?}" ) ;
437
437
continue ;
438
438
}
439
- debug ! ( "Visiting {:?}" , next_bcb) ;
440
- if self . backedges [ next_bcb] . len ( ) > 0 {
441
- debug ! ( "{:?} is a loop header! Start a new TraversalContext..." , next_bcb) ;
439
+ debug ! ( "Visiting {bcb:?}" ) ;
440
+
441
+ if self . backedges [ bcb] . len ( ) > 0 {
442
+ debug ! ( "{bcb:?} is a loop header! Start a new TraversalContext..." ) ;
442
443
self . context_stack . push ( TraversalContext {
443
- loop_backedges : Some ( ( self . backedges [ next_bcb ] . clone ( ) , next_bcb ) ) ,
444
+ loop_backedges : Some ( ( self . backedges [ bcb ] . clone ( ) , bcb ) ) ,
444
445
worklist : Vec :: new ( ) ,
445
446
} ) ;
446
447
}
447
- self . extend_worklist ( basic_coverage_blocks, next_bcb ) ;
448
- return Some ( next_bcb ) ;
448
+ self . extend_worklist ( basic_coverage_blocks, bcb ) ;
449
+ return Some ( bcb ) ;
449
450
} else {
450
451
// Strip contexts with empty worklists from the top of the stack
451
452
self . context_stack . pop ( ) ;
0 commit comments