1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// TODO: use a modified baseRef
use ;
use crate;
/// Function-local block index (indexes the owning [`FunctionBody`](crate::value::FunctionBody)'s block arena).
;
cratecomposite_id!;
/// Function-local CFG-edge index. A plain body-local id (stage 4): it indexes
/// the owning [`FunctionBody`](crate::value::FunctionBody)'s edge arena directly and carries **no** function
/// qualifier. Global addressing of an edge is the explicit pair
/// `(FunctionId, EdgeId)`; every edge is stored in its `from` block's function,
/// so the owning function is recoverable from either incident block.
;
// A plain body-local [`EdgeId`] no longer self-describes its owning function, so
// the old whole-context `EdgeRef`/`EdgeMutRef` wrappers (which resolved
// `values.edge(id)` without a function) are gone. Edges are read through
// `FunctionBody::edge(id)` / `QCodeView::edge(func, id)` with the owning function named
// explicitly. Strict locality (context-split ruling 2) guarantees both endpoints
// live in the edge's own function, so `from`/`to` are bare `LocalBlockId`s;
// qualify with the owning function (which every reader names) to get a composite
// `BlockId`.
// ---------------------------------------------------------------------------
// A CFG rooted at a single function.
//
// The CFG is inherently per-function: its nodes are the function's own blocks.
// Dominator analysis needs only the successor relation (see jstd's `Cfg`), which
// [`BlockRef::successors`] already routes through the function's [`QCodeView`], so
// it reads a *checked-out* function correctly inside a `FunctionPass`.
// ---------------------------------------------------------------------------