Make coverage expression IDs count up from 0, not down from u32::MAX

Operand types are now tracked explicitly, so there is no need for expression
IDs to avoid counter IDs by descending from `u32::MAX`. Instead they can just
count up from 0, and can be used directly as indices when necessary.
This commit is contained in:
Zalathar
2023-06-29 12:14:04 +10:00
parent 1a014d42f4
commit f103db894f
9 changed files with 49 additions and 71 deletions

View File

@@ -485,7 +485,7 @@ impl GraphvizData {
/// _not_ used are retained in the `unused_expressions` Vec, to be included in debug output (logs
/// and/or a `CoverageGraph` graphviz output).
pub(super) struct UsedExpressions {
some_used_expression_operands: Option<FxHashMap<Operand, Vec<InjectedExpressionId>>>,
some_used_expression_operands: Option<FxHashMap<Operand, Vec<ExpressionId>>>,
some_unused_expressions:
Option<Vec<(CoverageKind, Option<BasicCoverageBlock>, BasicCoverageBlock)>>,
}