@@ -288,7 +288,7 @@ impl<'a> MakeBcbCounters<'a> {
288
288
) {
289
289
// First, ensure that this node has a counter of some kind.
290
290
// We might also use that counter to compute one of the out-edge counters.
291
- let from_bcb_operand = self . get_or_make_counter_operand ( from_bcb) ;
291
+ let node_counter = self . get_or_make_node_counter ( from_bcb) ;
292
292
293
293
let successors = self . basic_coverage_blocks . successors [ from_bcb] . as_slice ( ) ;
294
294
@@ -324,7 +324,7 @@ impl<'a> MakeBcbCounters<'a> {
324
324
. filter ( |& to_bcb| to_bcb != expression_to_bcb)
325
325
. fold ( None , |accum, to_bcb| {
326
326
let _span = debug_span ! ( "to_bcb" , ?accum, ?to_bcb) . entered ( ) ;
327
- let edge_counter = self . get_or_make_edge_counter_operand ( from_bcb, to_bcb) ;
327
+ let edge_counter = self . get_or_make_edge_counter ( from_bcb, to_bcb) ;
328
328
Some ( self . coverage_counters . make_sum_expression ( accum, edge_counter) )
329
329
} )
330
330
. expect ( "there must be at least one other out-edge" )
@@ -333,7 +333,7 @@ impl<'a> MakeBcbCounters<'a> {
333
333
// Now create an expression for the chosen edge, by taking the counter
334
334
// for its source node and subtracting the sum of its sibling out-edges.
335
335
let expression = self . coverage_counters . make_expression (
336
- from_bcb_operand ,
336
+ node_counter ,
337
337
Op :: Subtract ,
338
338
sum_of_all_other_out_edges,
339
339
) ;
@@ -347,7 +347,7 @@ impl<'a> MakeBcbCounters<'a> {
347
347
}
348
348
349
349
#[ instrument( level = "debug" , skip( self ) ) ]
350
- fn get_or_make_counter_operand ( & mut self , bcb : BasicCoverageBlock ) -> BcbCounter {
350
+ fn get_or_make_node_counter ( & mut self , bcb : BasicCoverageBlock ) -> BcbCounter {
351
351
// If the BCB already has a counter, return it.
352
352
if let Some ( counter_kind) = self . coverage_counters . bcb_counters [ bcb] {
353
353
debug ! ( "{bcb:?} already has a counter: {counter_kind:?}" ) ;
@@ -384,7 +384,7 @@ impl<'a> MakeBcbCounters<'a> {
384
384
. copied ( )
385
385
. fold ( None , |accum, from_bcb| {
386
386
let _span = debug_span ! ( "from_bcb" , ?accum, ?from_bcb) . entered ( ) ;
387
- let edge_counter = self . get_or_make_edge_counter_operand ( from_bcb, bcb) ;
387
+ let edge_counter = self . get_or_make_edge_counter ( from_bcb, bcb) ;
388
388
Some ( self . coverage_counters . make_sum_expression ( accum, edge_counter) )
389
389
} )
390
390
. expect ( "there must be at least one in-edge" )
@@ -395,7 +395,7 @@ impl<'a> MakeBcbCounters<'a> {
395
395
}
396
396
397
397
#[ instrument( level = "debug" , skip( self ) ) ]
398
- fn get_or_make_edge_counter_operand (
398
+ fn get_or_make_edge_counter (
399
399
& mut self ,
400
400
from_bcb : BasicCoverageBlock ,
401
401
to_bcb : BasicCoverageBlock ,
@@ -404,13 +404,13 @@ impl<'a> MakeBcbCounters<'a> {
404
404
// a node counter instead, since it will have the same value.
405
405
if !self . basic_coverage_blocks . bcb_has_multiple_in_edges ( to_bcb) {
406
406
assert_eq ! ( [ from_bcb] . as_slice( ) , self . basic_coverage_blocks. predecessors[ to_bcb] ) ;
407
- return self . get_or_make_counter_operand ( to_bcb) ;
407
+ return self . get_or_make_node_counter ( to_bcb) ;
408
408
}
409
409
410
410
// If the source BCB has only one successor (assumed to be the given target), an edge
411
411
// counter is unnecessary. Just get or make a counter for the source BCB.
412
412
if self . bcb_successors ( from_bcb) . len ( ) == 1 {
413
- return self . get_or_make_counter_operand ( from_bcb) ;
413
+ return self . get_or_make_node_counter ( from_bcb) ;
414
414
}
415
415
416
416
// If the edge already has a counter, return it.
0 commit comments