@@ -570,7 +570,19 @@ impl<O: ForestObligation> ObligationForest<O> {
570
570
#[ inline( always) ]
571
571
fn inlined_mark_neighbors_as_waiting_from ( & self , node : & Node < O > ) {
572
572
for & index in node. dependents . iter ( ) {
573
- self . mark_as_waiting_from ( & self . nodes [ index] ) ;
573
+ let node = & self . nodes [ index] ;
574
+ match node. state . get ( ) {
575
+ NodeState :: Waiting | NodeState :: Error => { }
576
+ NodeState :: Success => {
577
+ node. state . set ( NodeState :: Waiting ) ;
578
+ // This call site is cold.
579
+ self . uninlined_mark_neighbors_as_waiting_from ( node) ;
580
+ }
581
+ NodeState :: Pending | NodeState :: Done => {
582
+ // This call site is cold.
583
+ self . uninlined_mark_neighbors_as_waiting_from ( node) ;
584
+ }
585
+ }
574
586
}
575
587
}
576
588
@@ -596,17 +608,6 @@ impl<O: ForestObligation> ObligationForest<O> {
596
608
}
597
609
}
598
610
599
- fn mark_as_waiting_from ( & self , node : & Node < O > ) {
600
- match node. state . get ( ) {
601
- NodeState :: Waiting | NodeState :: Error => return ,
602
- NodeState :: Success => node. state . set ( NodeState :: Waiting ) ,
603
- NodeState :: Pending | NodeState :: Done => { } ,
604
- }
605
-
606
- // This call site is cold.
607
- self . uninlined_mark_neighbors_as_waiting_from ( node) ;
608
- }
609
-
610
611
/// Compresses the vector, removing all popped nodes. This adjusts
611
612
/// the indices and hence invalidates any outstanding
612
613
/// indices. Cannot be used during a transaction.
0 commit comments