coverage: Rename parameter branching_bcb
to from_bcb
This commit is contained in:
parent
37b2813a7b
commit
2cadd31c04
@ -250,13 +250,12 @@ impl<'a> MakeBcbCounters<'a> {
|
|||||||
fn make_branch_counters(
|
fn make_branch_counters(
|
||||||
&mut self,
|
&mut self,
|
||||||
traversal: &TraverseCoverageGraphWithLoops<'_>,
|
traversal: &TraverseCoverageGraphWithLoops<'_>,
|
||||||
branching_bcb: BasicCoverageBlock,
|
from_bcb: BasicCoverageBlock,
|
||||||
branching_counter_operand: CovTerm,
|
branching_counter_operand: CovTerm,
|
||||||
) {
|
) {
|
||||||
let branches = self.bcb_branches(branching_bcb);
|
let branches = self.bcb_branches(from_bcb);
|
||||||
debug!(
|
debug!(
|
||||||
"{:?} has some branch(es) without counters:\n {}",
|
"{from_bcb:?} has some branch(es) without counters:\n {}",
|
||||||
branching_bcb,
|
|
||||||
branches
|
branches
|
||||||
.iter()
|
.iter()
|
||||||
.map(|branch| { format!("{:?}: {:?}", branch, self.branch_counter(branch)) })
|
.map(|branch| { format!("{:?}: {:?}", branch, self.branch_counter(branch)) })
|
||||||
@ -281,14 +280,13 @@ impl<'a> MakeBcbCounters<'a> {
|
|||||||
if branch != expression_branch {
|
if branch != expression_branch {
|
||||||
let branch_counter_operand = if branch.is_only_path_to_target() {
|
let branch_counter_operand = if branch.is_only_path_to_target() {
|
||||||
debug!(
|
debug!(
|
||||||
" {:?} has only one incoming edge (from {:?}), so adding a \
|
" {branch:?} has only one incoming edge (from {from_bcb:?}), \
|
||||||
counter",
|
so adding a counter",
|
||||||
branch, branching_bcb
|
|
||||||
);
|
);
|
||||||
self.get_or_make_counter_operand(branch.target_bcb)
|
self.get_or_make_counter_operand(branch.target_bcb)
|
||||||
} else {
|
} else {
|
||||||
debug!(" {:?} has multiple incoming edges, so adding an edge counter", branch);
|
debug!(" {:?} has multiple incoming edges, so adding an edge counter", branch);
|
||||||
self.get_or_make_edge_counter_operand(branching_bcb, branch.target_bcb)
|
self.get_or_make_edge_counter_operand(from_bcb, branch.target_bcb)
|
||||||
};
|
};
|
||||||
if let Some(sumup_counter_operand) =
|
if let Some(sumup_counter_operand) =
|
||||||
some_sumup_counter_operand.replace(branch_counter_operand)
|
some_sumup_counter_operand.replace(branch_counter_operand)
|
||||||
@ -325,7 +323,7 @@ impl<'a> MakeBcbCounters<'a> {
|
|||||||
if expression_branch.is_only_path_to_target() {
|
if expression_branch.is_only_path_to_target() {
|
||||||
self.coverage_counters.set_bcb_counter(bcb, expression);
|
self.coverage_counters.set_bcb_counter(bcb, expression);
|
||||||
} else {
|
} else {
|
||||||
self.coverage_counters.set_bcb_edge_counter(branching_bcb, bcb, expression);
|
self.coverage_counters.set_bcb_edge_counter(from_bcb, bcb, expression);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user