@@ -222,7 +222,7 @@ impl<O> Node<O> {
222
222
/// v
223
223
/// Success
224
224
/// | ^
225
- /// | | mark_as_waiting ()
225
+ /// | | update_waiting_and_success_states ()
226
226
/// | v
227
227
/// | Waiting
228
228
/// |
@@ -480,7 +480,7 @@ impl<O: ForestObligation> ObligationForest<O> {
480
480
} ;
481
481
}
482
482
483
- self . mark_as_waiting ( ) ;
483
+ self . update_waiting_and_success_states ( ) ;
484
484
self . process_cycles ( processor) ;
485
485
let completed = self . compress ( do_completed) ;
486
486
@@ -494,8 +494,8 @@ impl<O: ForestObligation> ObligationForest<O> {
494
494
}
495
495
496
496
/// Mark all `Success` nodes as `Done` and report all cycles between them.
497
- /// This should be called after `mark_as_waiting ` updates the status of all
498
- /// `Waiting` and `Success` nodes.
497
+ /// This should be called after `update_waiting_and_success_states ` updates
498
+ /// the status of all `Waiting` and `Success` nodes.
499
499
fn process_cycles < P > ( & self , processor : & mut P )
500
500
where P : ObligationProcessor < Obligation =O >
501
501
{
@@ -577,34 +577,34 @@ impl<O: ForestObligation> ObligationForest<O> {
577
577
578
578
// This always-inlined function is for the hot call site.
579
579
#[ inline( always) ]
580
- fn inlined_mark_neighbors_as_waiting_from ( & self , node : & Node < O > ) {
580
+ fn inlined_mark_dependents_as_waiting ( & self , node : & Node < O > ) {
581
581
for & index in node. dependents . iter ( ) {
582
582
let node = & self . nodes [ index] ;
583
583
match node. state . get ( ) {
584
584
NodeState :: Waiting | NodeState :: Error => { }
585
585
NodeState :: Success => {
586
586
node. state . set ( NodeState :: Waiting ) ;
587
587
// This call site is cold.
588
- self . uninlined_mark_neighbors_as_waiting_from ( node) ;
588
+ self . uninlined_mark_dependents_as_waiting ( node) ;
589
589
}
590
590
NodeState :: Pending | NodeState :: Done => {
591
591
// This call site is cold.
592
- self . uninlined_mark_neighbors_as_waiting_from ( node) ;
592
+ self . uninlined_mark_dependents_as_waiting ( node) ;
593
593
}
594
594
}
595
595
}
596
596
}
597
597
598
598
// This never-inlined function is for the cold call site.
599
599
#[ inline( never) ]
600
- fn uninlined_mark_neighbors_as_waiting_from ( & self , node : & Node < O > ) {
601
- self . inlined_mark_neighbors_as_waiting_from ( node)
600
+ fn uninlined_mark_dependents_as_waiting ( & self , node : & Node < O > ) {
601
+ self . inlined_mark_dependents_as_waiting ( node)
602
602
}
603
603
604
604
/// Updates the states of all `Waiting` and `Success` nodes. Upon
605
605
/// completion, all such nodes that depend on a pending node will be marked
606
606
/// as `Waiting`, and all others will be marked as `Success`.
607
- fn mark_as_waiting ( & self ) {
607
+ fn update_waiting_and_success_states ( & self ) {
608
608
// Optimistically mark all `Waiting` nodes as `Success`.
609
609
for node in & self . nodes {
610
610
if node. state . get ( ) == NodeState :: Waiting {
@@ -617,7 +617,7 @@ impl<O: ForestObligation> ObligationForest<O> {
617
617
for node in & self . nodes {
618
618
if node. state . get ( ) == NodeState :: Pending {
619
619
// This call site is hot.
620
- self . inlined_mark_neighbors_as_waiting_from ( node) ;
620
+ self . inlined_mark_dependents_as_waiting ( node) ;
621
621
}
622
622
}
623
623
}
0 commit comments