@@ -344,15 +344,8 @@ impl<'a> MakeBcbCounters<'a> {
344
344
Ok ( ( ) )
345
345
}
346
346
347
- fn get_or_make_counter_operand ( & mut self , bcb : BasicCoverageBlock ) -> Result < CovTerm , Error > {
348
- self . recursive_get_or_make_counter_operand ( bcb)
349
- }
350
-
351
347
#[ instrument( level = "debug" , skip( self ) ) ]
352
- fn recursive_get_or_make_counter_operand (
353
- & mut self ,
354
- bcb : BasicCoverageBlock ,
355
- ) -> Result < CovTerm , Error > {
348
+ fn get_or_make_counter_operand ( & mut self , bcb : BasicCoverageBlock ) -> Result < CovTerm , Error > {
356
349
// If the BCB already has a counter, return it.
357
350
if let Some ( counter_kind) = & self . coverage_counters . bcb_counters [ bcb] {
358
351
debug ! ( "{bcb:?} already has a counter: {counter_kind:?}" ) ;
@@ -384,11 +377,10 @@ impl<'a> MakeBcbCounters<'a> {
384
377
let mut predecessors = self . bcb_predecessors ( bcb) . to_owned ( ) . into_iter ( ) ;
385
378
debug ! ( "{bcb:?} has multiple incoming edges and will need a sum-up expression" ) ;
386
379
let first_edge_counter_operand =
387
- self . recursive_get_or_make_edge_counter_operand ( predecessors. next ( ) . unwrap ( ) , bcb) ?;
380
+ self . get_or_make_edge_counter_operand ( predecessors. next ( ) . unwrap ( ) , bcb) ?;
388
381
let mut some_sumup_edge_counter_operand = None ;
389
382
for predecessor in predecessors {
390
- let edge_counter_operand =
391
- self . recursive_get_or_make_edge_counter_operand ( predecessor, bcb) ?;
383
+ let edge_counter_operand = self . get_or_make_edge_counter_operand ( predecessor, bcb) ?;
392
384
if let Some ( sumup_edge_counter_operand) =
393
385
some_sumup_edge_counter_operand. replace ( edge_counter_operand)
394
386
{
@@ -411,16 +403,8 @@ impl<'a> MakeBcbCounters<'a> {
411
403
self . coverage_counters . set_bcb_counter ( bcb, counter_kind)
412
404
}
413
405
414
- fn get_or_make_edge_counter_operand (
415
- & mut self ,
416
- from_bcb : BasicCoverageBlock ,
417
- to_bcb : BasicCoverageBlock ,
418
- ) -> Result < CovTerm , Error > {
419
- self . recursive_get_or_make_edge_counter_operand ( from_bcb, to_bcb)
420
- }
421
-
422
406
#[ instrument( level = "debug" , skip( self ) ) ]
423
- fn recursive_get_or_make_edge_counter_operand (
407
+ fn get_or_make_edge_counter_operand (
424
408
& mut self ,
425
409
from_bcb : BasicCoverageBlock ,
426
410
to_bcb : BasicCoverageBlock ,
@@ -429,7 +413,7 @@ impl<'a> MakeBcbCounters<'a> {
429
413
// counter is unnecessary. Just get or make a counter for the source BCB.
430
414
let successors = self . bcb_successors ( from_bcb) . iter ( ) ;
431
415
if successors. len ( ) == 1 {
432
- return self . recursive_get_or_make_counter_operand ( from_bcb) ;
416
+ return self . get_or_make_counter_operand ( from_bcb) ;
433
417
}
434
418
435
419
// If the edge already has a counter, return it.
0 commit comments