Skip to content

Commit 44e4e45

Browse files
committed
coverage: Add an extra "transcribe" step after counter creation
1 parent aca6dba commit 44e4e45

37 files changed

+1608
-1440
lines changed

compiler/rustc_mir_transform/src/coverage/counters.rs

+129-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::cmp::Ordering;
12
use std::fmt::{self, Debug};
23

34
use rustc_data_structures::captures::Captures;
@@ -10,9 +11,12 @@ use tracing::{debug, debug_span, instrument};
1011

1112
use crate::coverage::graph::{BasicCoverageBlock, CoverageGraph, TraverseCoverageGraphWithLoops};
1213

14+
#[cfg(test)]
15+
mod tests;
16+
1317
/// The coverage counter or counter expression associated with a particular
1418
/// BCB node or BCB edge.
15-
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
19+
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
1620
enum BcbCounter {
1721
Counter { id: CounterId },
1822
Expression { id: ExpressionId },
@@ -44,7 +48,7 @@ struct BcbExpression {
4448
}
4549

4650
/// Enum representing either a node or an edge in the coverage graph.
47-
#[derive(Clone, Copy, Debug)]
51+
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
4852
pub(super) enum Site {
4953
Node { bcb: BasicCoverageBlock },
5054
Edge { from_bcb: BasicCoverageBlock, to_bcb: BasicCoverageBlock },
@@ -84,7 +88,7 @@ impl CoverageCounters {
8488
let mut builder = CountersBuilder::new(graph, bcb_needs_counter);
8589
builder.make_bcb_counters();
8690

87-
builder.counters
91+
builder.into_coverage_counters()
8892
}
8993

9094
fn with_num_bcbs(num_bcbs: usize) -> Self {
@@ -496,4 +500,126 @@ impl<'a> CountersBuilder<'a> {
496500

497501
None
498502
}
503+
504+
fn into_coverage_counters(self) -> CoverageCounters {
505+
Transcriber::new(&self).transcribe_counters()
506+
}
507+
}
508+
509+
/// Helper struct for converting `CountersBuilder` into a final `CoverageCounters`.
510+
struct Transcriber<'a> {
511+
old: &'a CountersBuilder<'a>,
512+
new: CoverageCounters,
513+
phys_counter_for_site: FxHashMap<Site, BcbCounter>,
514+
}
515+
516+
impl<'a> Transcriber<'a> {
517+
fn new(old: &'a CountersBuilder<'a>) -> Self {
518+
Self {
519+
old,
520+
new: CoverageCounters::with_num_bcbs(old.graph.num_nodes()),
521+
phys_counter_for_site: FxHashMap::default(),
522+
}
523+
}
524+
525+
fn transcribe_counters(mut self) -> CoverageCounters {
526+
for bcb in self.old.bcb_needs_counter.iter() {
527+
let site = Site::Node { bcb };
528+
let Some(old_counter) = self.old.counters.node_counters[bcb] else { continue };
529+
530+
// Resolve the old counter into flat lists of nodes/edges whose
531+
// physical counts contribute to the counter for this node.
532+
// Distinguish between counts that will be added vs subtracted.
533+
let mut pos = vec![];
534+
let mut neg = vec![];
535+
self.push_resolved_sites(old_counter, &mut pos, &mut neg);
536+
537+
// Simplify by cancelling out sites that appear on both sides.
538+
let (mut pos, mut neg) = sort_and_cancel(pos, neg);
539+
540+
if pos.is_empty() {
541+
// If we somehow end up with no positive terms after cancellation,
542+
// fall back to creating a physical counter. There's no known way
543+
// for this to happen, but it's hard to confidently rule it out.
544+
debug_assert!(false, "{site:?} has no positive counter terms");
545+
pos = vec![Some(site)];
546+
neg = vec![];
547+
}
548+
549+
let mut new_counters_for_sites = |sites: Vec<Option<Site>>| {
550+
sites
551+
.into_iter()
552+
.filter_map(|id| try { self.ensure_phys_counter(id?) })
553+
.collect::<Vec<_>>()
554+
};
555+
let mut pos = new_counters_for_sites(pos);
556+
let mut neg = new_counters_for_sites(neg);
557+
558+
pos.sort();
559+
neg.sort();
560+
561+
let pos_counter = self.new.make_sum(&pos).expect("`pos` should not be empty");
562+
let new_counter = self.new.make_subtracted_sum(pos_counter, &neg);
563+
self.new.set_node_counter(bcb, new_counter);
564+
}
565+
566+
self.new
567+
}
568+
569+
fn ensure_phys_counter(&mut self, site: Site) -> BcbCounter {
570+
*self.phys_counter_for_site.entry(site).or_insert_with(|| self.new.make_phys_counter(site))
571+
}
572+
573+
/// Resolves the given counter into flat lists of nodes/edges, whose counters
574+
/// will then be added and subtracted to form a counter expression.
575+
fn push_resolved_sites(&self, counter: BcbCounter, pos: &mut Vec<Site>, neg: &mut Vec<Site>) {
576+
match counter {
577+
BcbCounter::Counter { id } => pos.push(self.old.counters.counter_increment_sites[id]),
578+
BcbCounter::Expression { id } => {
579+
let BcbExpression { lhs, op, rhs } = self.old.counters.expressions[id];
580+
self.push_resolved_sites(lhs, pos, neg);
581+
match op {
582+
Op::Add => self.push_resolved_sites(rhs, pos, neg),
583+
// Swap `neg` and `pos` so that the counter is subtracted.
584+
Op::Subtract => self.push_resolved_sites(rhs, neg, pos),
585+
}
586+
}
587+
}
588+
}
589+
}
590+
591+
/// Given two lists:
592+
/// - Sorts each list.
593+
/// - Converts each list to `Vec<Option<T>>`.
594+
/// - Scans for values that appear in both lists, and cancels them out by
595+
/// replacing matching pairs of values with `None`.
596+
fn sort_and_cancel<T: Ord>(mut pos: Vec<T>, mut neg: Vec<T>) -> (Vec<Option<T>>, Vec<Option<T>>) {
597+
pos.sort();
598+
neg.sort();
599+
600+
// Convert to `Vec<Option<T>>`. If `T` has a niche, this should be zero-cost.
601+
let mut pos = pos.into_iter().map(Some).collect::<Vec<_>>();
602+
let mut neg = neg.into_iter().map(Some).collect::<Vec<_>>();
603+
604+
// Scan through the lists using two cursors. When either cursor reaches the
605+
// end of its list, there can be no more equal pairs, so stop.
606+
let mut p = 0;
607+
let mut n = 0;
608+
while p < pos.len() && n < neg.len() {
609+
// If the values are equal, remove them and advance both cursors.
610+
// Otherwise, advance whichever cursor points to the lesser value.
611+
// (Choosing which cursor to advance relies on both lists being sorted.)
612+
match pos[p].cmp(&neg[n]) {
613+
Ordering::Less => p += 1,
614+
Ordering::Equal => {
615+
pos[p] = None;
616+
neg[n] = None;
617+
p += 1;
618+
n += 1;
619+
}
620+
Ordering::Greater => n += 1,
621+
}
622+
}
623+
624+
(pos, neg)
499625
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
use std::fmt::Debug;
2+
3+
use super::sort_and_cancel;
4+
5+
fn flatten<T>(input: Vec<Option<T>>) -> Vec<T> {
6+
input.into_iter().flatten().collect()
7+
}
8+
9+
fn sort_and_cancel_and_flatten<T: Clone + Ord>(pos: Vec<T>, neg: Vec<T>) -> (Vec<T>, Vec<T>) {
10+
let (pos_actual, neg_actual) = sort_and_cancel(pos, neg);
11+
(flatten(pos_actual), flatten(neg_actual))
12+
}
13+
14+
#[track_caller]
15+
fn check_test_case<T: Clone + Debug + Ord>(
16+
pos: Vec<T>,
17+
neg: Vec<T>,
18+
pos_expected: Vec<T>,
19+
neg_expected: Vec<T>,
20+
) {
21+
eprintln!("pos = {pos:?}; neg = {neg:?}");
22+
let output = sort_and_cancel_and_flatten(pos, neg);
23+
assert_eq!(output, (pos_expected, neg_expected));
24+
}
25+
26+
#[test]
27+
fn cancellation() {
28+
let cases: &[(Vec<u32>, Vec<u32>, Vec<u32>, Vec<u32>)] = &[
29+
(vec![], vec![], vec![], vec![]),
30+
(vec![4, 2, 1, 5, 3], vec![], vec![1, 2, 3, 4, 5], vec![]),
31+
(vec![5, 5, 5, 5, 5], vec![5], vec![5, 5, 5, 5], vec![]),
32+
(vec![1, 1, 2, 2, 3, 3], vec![1, 2, 3], vec![1, 2, 3], vec![]),
33+
(vec![1, 1, 2, 2, 3, 3], vec![2, 4, 2], vec![1, 1, 3, 3], vec![4]),
34+
];
35+
36+
for (pos, neg, pos_expected, neg_expected) in cases {
37+
check_test_case(pos.to_vec(), neg.to_vec(), pos_expected.to_vec(), neg_expected.to_vec());
38+
// Same test case, but with its inputs flipped and its outputs flipped.
39+
check_test_case(neg.to_vec(), pos.to_vec(), neg_expected.to_vec(), pos_expected.to_vec());
40+
}
41+
}

tests/coverage/abort.cov-map

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
Function name: abort::main
2-
Raw bytes (89): 0x[01, 01, 0a, 01, 27, 05, 09, 03, 0d, 22, 11, 03, 0d, 03, 0d, 22, 15, 03, 0d, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 09, 00, 0a, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 30, 00, 31, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 30, 00, 31, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
2+
Raw bytes (89): 0x[01, 01, 0a, 07, 09, 01, 05, 03, 0d, 03, 13, 0d, 11, 03, 0d, 03, 1f, 0d, 15, 03, 0d, 05, 09, 0d, 01, 0d, 01, 01, 1b, 03, 02, 0b, 00, 18, 22, 01, 0c, 00, 19, 11, 00, 1a, 02, 0a, 0e, 02, 09, 00, 0a, 22, 02, 0c, 00, 19, 15, 00, 1a, 00, 31, 1a, 00, 30, 00, 31, 22, 04, 0c, 00, 19, 05, 00, 1a, 00, 31, 09, 00, 30, 00, 31, 27, 01, 09, 00, 17, 0d, 02, 05, 01, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 10
6-
- expression 0 operands: lhs = Counter(0), rhs = Expression(9, Add)
7-
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
6+
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(2)
7+
- expression 1 operands: lhs = Counter(0), rhs = Counter(1)
88
- expression 2 operands: lhs = Expression(0, Add), rhs = Counter(3)
9-
- expression 3 operands: lhs = Expression(8, Sub), rhs = Counter(4)
10-
- expression 4 operands: lhs = Expression(0, Add), rhs = Counter(3)
9+
- expression 3 operands: lhs = Expression(0, Add), rhs = Expression(4, Add)
10+
- expression 4 operands: lhs = Counter(3), rhs = Counter(4)
1111
- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(3)
12-
- expression 6 operands: lhs = Expression(8, Sub), rhs = Counter(5)
13-
- expression 7 operands: lhs = Expression(0, Add), rhs = Counter(3)
12+
- expression 6 operands: lhs = Expression(0, Add), rhs = Expression(7, Add)
13+
- expression 7 operands: lhs = Counter(3), rhs = Counter(5)
1414
- expression 8 operands: lhs = Expression(0, Add), rhs = Counter(3)
1515
- expression 9 operands: lhs = Counter(1), rhs = Counter(2)
1616
Number of file 0 mappings: 13
1717
- Code(Counter(0)) at (prev + 13, 1) to (start + 1, 27)
1818
- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
19-
= (c0 + (c1 + c2))
19+
= ((c0 + c1) + c2)
2020
- Code(Expression(8, Sub)) at (prev + 1, 12) to (start + 0, 25)
21-
= ((c0 + (c1 + c2)) - c3)
21+
= (((c0 + c1) + c2) - c3)
2222
- Code(Counter(4)) at (prev + 0, 26) to (start + 2, 10)
2323
- Code(Expression(3, Sub)) at (prev + 2, 9) to (start + 0, 10)
24-
= (((c0 + (c1 + c2)) - c3) - c4)
24+
= (((c0 + c1) + c2) - (c3 + c4))
2525
- Code(Expression(8, Sub)) at (prev + 2, 12) to (start + 0, 25)
26-
= ((c0 + (c1 + c2)) - c3)
26+
= (((c0 + c1) + c2) - c3)
2727
- Code(Counter(5)) at (prev + 0, 26) to (start + 0, 49)
2828
- Code(Expression(6, Sub)) at (prev + 0, 48) to (start + 0, 49)
29-
= (((c0 + (c1 + c2)) - c3) - c5)
29+
= (((c0 + c1) + c2) - (c3 + c5))
3030
- Code(Expression(8, Sub)) at (prev + 4, 12) to (start + 0, 25)
31-
= ((c0 + (c1 + c2)) - c3)
31+
= (((c0 + c1) + c2) - c3)
3232
- Code(Counter(1)) at (prev + 0, 26) to (start + 0, 49)
3333
- Code(Counter(2)) at (prev + 0, 48) to (start + 0, 49)
3434
- Code(Expression(9, Add)) at (prev + 1, 9) to (start + 0, 23)

tests/coverage/assert.cov-map

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
Function name: assert::main
2-
Raw bytes (65): 0x[01, 01, 08, 01, 1b, 05, 1f, 09, 0d, 03, 11, 16, 05, 03, 11, 05, 1f, 09, 0d, 09, 01, 09, 01, 01, 1b, 03, 02, 0b, 00, 18, 16, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1b, 01, 09, 00, 17, 11, 02, 05, 01, 02]
2+
Raw bytes (67): 0x[01, 01, 09, 07, 0d, 0b, 09, 01, 05, 03, 11, 17, 11, 1b, 0d, 01, 09, 23, 0d, 05, 09, 09, 01, 09, 01, 01, 1b, 03, 02, 0b, 00, 18, 0e, 01, 0c, 00, 1a, 05, 00, 1b, 02, 0a, 12, 02, 13, 00, 20, 09, 00, 21, 02, 0a, 0d, 02, 09, 00, 0a, 1f, 01, 09, 00, 17, 11, 02, 05, 01, 02]
33
Number of files: 1
44
- file 0 => global file 1
5-
Number of expressions: 8
6-
- expression 0 operands: lhs = Counter(0), rhs = Expression(6, Add)
7-
- expression 1 operands: lhs = Counter(1), rhs = Expression(7, Add)
8-
- expression 2 operands: lhs = Counter(2), rhs = Counter(3)
5+
Number of expressions: 9
6+
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(3)
7+
- expression 1 operands: lhs = Expression(2, Add), rhs = Counter(2)
8+
- expression 2 operands: lhs = Counter(0), rhs = Counter(1)
99
- expression 3 operands: lhs = Expression(0, Add), rhs = Counter(4)
10-
- expression 4 operands: lhs = Expression(5, Sub), rhs = Counter(1)
11-
- expression 5 operands: lhs = Expression(0, Add), rhs = Counter(4)
12-
- expression 6 operands: lhs = Counter(1), rhs = Expression(7, Add)
13-
- expression 7 operands: lhs = Counter(2), rhs = Counter(3)
10+
- expression 4 operands: lhs = Expression(5, Add), rhs = Counter(4)
11+
- expression 5 operands: lhs = Expression(6, Add), rhs = Counter(3)
12+
- expression 6 operands: lhs = Counter(0), rhs = Counter(2)
13+
- expression 7 operands: lhs = Expression(8, Add), rhs = Counter(3)
14+
- expression 8 operands: lhs = Counter(1), rhs = Counter(2)
1415
Number of file 0 mappings: 9
1516
- Code(Counter(0)) at (prev + 9, 1) to (start + 1, 27)
1617
- Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 24)
17-
= (c0 + (c1 + (c2 + c3)))
18-
- Code(Expression(5, Sub)) at (prev + 1, 12) to (start + 0, 26)
19-
= ((c0 + (c1 + (c2 + c3))) - c4)
18+
= (((c0 + c1) + c2) + c3)
19+
- Code(Expression(3, Sub)) at (prev + 1, 12) to (start + 0, 26)
20+
= ((((c0 + c1) + c2) + c3) - c4)
2021
- Code(Counter(1)) at (prev + 0, 27) to (start + 2, 10)
2122
- Code(Expression(4, Sub)) at (prev + 2, 19) to (start + 0, 32)
22-
= (((c0 + (c1 + (c2 + c3))) - c4) - c1)
23+
= (((c0 + c2) + c3) - c4)
2324
- Code(Counter(2)) at (prev + 0, 33) to (start + 2, 10)
2425
- Code(Counter(3)) at (prev + 2, 9) to (start + 0, 10)
25-
- Code(Expression(6, Add)) at (prev + 1, 9) to (start + 0, 23)
26-
= (c1 + (c2 + c3))
26+
- Code(Expression(7, Add)) at (prev + 1, 9) to (start + 0, 23)
27+
= ((c1 + c2) + c3)
2728
- Code(Counter(4)) at (prev + 2, 5) to (start + 1, 2)
2829
Highest counter ID seen: c4
2930

tests/coverage/async.cov-map

+12-15
Original file line numberDiff line numberDiff line change
@@ -155,25 +155,25 @@ Number of file 0 mappings: 1
155155
Highest counter ID seen: c0
156156

157157
Function name: async::i::{closure#0}
158-
Raw bytes (63): 0x[01, 01, 02, 07, 19, 11, 15, 0b, 01, 2d, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 0d, 00, 0e, 00, 17, 1d, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 19, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
158+
Raw bytes (63): 0x[01, 01, 02, 07, 15, 0d, 11, 0b, 01, 2d, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 11, 01, 09, 00, 0a, 19, 00, 0e, 00, 17, 1d, 00, 1b, 00, 20, 11, 00, 24, 00, 26, 15, 01, 0e, 00, 10, 03, 02, 01, 00, 02]
159159
Number of files: 1
160160
- file 0 => global file 1
161161
Number of expressions: 2
162-
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(6)
163-
- expression 1 operands: lhs = Counter(4), rhs = Counter(5)
162+
- expression 0 operands: lhs = Expression(1, Add), rhs = Counter(5)
163+
- expression 1 operands: lhs = Counter(3), rhs = Counter(4)
164164
Number of file 0 mappings: 11
165165
- Code(Counter(0)) at (prev + 45, 19) to (start + 4, 12)
166166
- Code(Counter(2)) at (prev + 5, 9) to (start + 0, 10)
167167
- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24)
168168
- Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33)
169169
- Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48)
170-
- Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10)
171-
- Code(Counter(3)) at (prev + 0, 14) to (start + 0, 23)
170+
- Code(Counter(4)) at (prev + 1, 9) to (start + 0, 10)
171+
- Code(Counter(6)) at (prev + 0, 14) to (start + 0, 23)
172172
- Code(Counter(7)) at (prev + 0, 27) to (start + 0, 32)
173-
- Code(Counter(5)) at (prev + 0, 36) to (start + 0, 38)
174-
- Code(Counter(6)) at (prev + 1, 14) to (start + 0, 16)
173+
- Code(Counter(4)) at (prev + 0, 36) to (start + 0, 38)
174+
- Code(Counter(5)) at (prev + 1, 14) to (start + 0, 16)
175175
- Code(Expression(0, Add)) at (prev + 2, 1) to (start + 0, 2)
176-
= ((c4 + c5) + c6)
176+
= ((c3 + c4) + c5)
177177
Highest counter ID seen: c7
178178

179179
Function name: async::j
@@ -243,22 +243,19 @@ Number of file 0 mappings: 5
243243
Highest counter ID seen: (none)
244244

245245
Function name: async::l
246-
Raw bytes (37): 0x[01, 01, 04, 01, 07, 05, 09, 0f, 02, 09, 05, 05, 01, 52, 01, 01, 0c, 02, 02, 0e, 00, 10, 05, 01, 0e, 00, 10, 09, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
246+
Raw bytes (33): 0x[01, 01, 02, 01, 07, 05, 09, 05, 01, 52, 01, 01, 0c, 02, 02, 0e, 00, 10, 09, 01, 0e, 00, 10, 05, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
247247
Number of files: 1
248248
- file 0 => global file 1
249-
Number of expressions: 4
249+
Number of expressions: 2
250250
- expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
251251
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
252-
- expression 2 operands: lhs = Expression(3, Add), rhs = Expression(0, Sub)
253-
- expression 3 operands: lhs = Counter(2), rhs = Counter(1)
254252
Number of file 0 mappings: 5
255253
- Code(Counter(0)) at (prev + 82, 1) to (start + 1, 12)
256254
- Code(Expression(0, Sub)) at (prev + 2, 14) to (start + 0, 16)
257255
= (c0 - (c1 + c2))
258-
- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 16)
259256
- Code(Counter(2)) at (prev + 1, 14) to (start + 0, 16)
260-
- Code(Expression(2, Add)) at (prev + 2, 1) to (start + 0, 2)
261-
= ((c2 + c1) + (c0 - (c1 + c2)))
257+
- Code(Counter(1)) at (prev + 1, 14) to (start + 0, 16)
258+
- Code(Counter(0)) at (prev + 2, 1) to (start + 0, 2)
262259
Highest counter ID seen: c2
263260

264261
Function name: async::m

tests/coverage/branch/guard.cov-map

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Function name: guard::branch_match_guard
2-
Raw bytes (85): 0x[01, 01, 06, 19, 0d, 05, 09, 0f, 15, 13, 11, 17, 0d, 05, 09, 0d, 01, 0c, 01, 01, 10, 02, 03, 0b, 00, 0c, 15, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 19, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 09, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 17, 03, 0e, 02, 0a, 0b, 04, 01, 00, 02]
2+
Raw bytes (85): 0x[01, 01, 06, 19, 0d, 05, 09, 0f, 15, 13, 11, 17, 0d, 05, 09, 0d, 01, 0c, 01, 01, 10, 02, 03, 0b, 00, 0c, 15, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 19, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 05, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 17, 03, 0e, 02, 0a, 0b, 04, 01, 00, 02]
33
Number of files: 1
44
- file 0 => global file 1
55
Number of expressions: 6
@@ -23,9 +23,9 @@ Number of file 0 mappings: 13
2323
- Code(Counter(4)) at (prev + 3, 14) to (start + 0, 15)
2424
- Code(Expression(0, Sub)) at (prev + 0, 20) to (start + 0, 25)
2525
= (c6 - c3)
26-
- Branch { true: Counter(4), false: Counter(2) } at (prev + 0, 20) to (start + 0, 30)
26+
- Branch { true: Counter(4), false: Counter(1) } at (prev + 0, 20) to (start + 0, 30)
2727
true = c4
28-
false = c2
28+
false = c1
2929
- Code(Counter(4)) at (prev + 0, 29) to (start + 2, 10)
3030
- Code(Expression(5, Add)) at (prev + 3, 14) to (start + 2, 10)
3131
= (c1 + c2)

0 commit comments

Comments
 (0)