Expand description
MirProgram + MirFn — the top-level shape of Core MIR.
Phase 2a of #252. The data model is structured (not flat /
basic-block), expression-based (every MirExpr is a value), and
identity-typed (declaration refs go through FnId / TypeId /
CtorId). See [super::RFC.md] for the full rationale.
Structs§
- LocalId
- Local binding identifier. Unique per function body (not per
program) — backends look up the binding by walking the body’s
Letchain, so collision across functions isn’t a concern. - MirFn
- One function in Core MIR. Body is a single
MirExpr— MIR is expression-based, so the function’s body is the expression that produces its return value.Letchains within the body bind intermediate results; there’s no separate “block” or “terminator” concept at this phase. - MirFn
Repr - Per-fn Int-representation summary made explicit on the rewritten MIR
(ETAP-2 SLICE 1). Default-empty ⇒ everything is the arbitrary-precision
Int(aver_rt::AverInt), the fail-closed baseline. Populated only bybare_i64::rewrite_for_rust. - MirParam
- One formal parameter. The
LocalIdis assigned at lowering time and is the binding the function body refers to. - MirProgram
- A whole compiled program in Core MIR. Keyed by
FnId(stable across compilation units; same identity layer the rest of the pipeline consumes). Phase 2a builds an emptyMirProgramdirectly; Phase 3 grows the lowering that populates it fromResolvedProgramView.