Skip to main content

shape_vm/mir/
mod.rs

1//! Mid-level Intermediate Representation (MIR) for borrow checking.
2//!
3//! Shape compiles AST → MIR → bytecode. The MIR is a CFG-based IR used by:
4//! - The Datafrog borrow solver (NLL borrow checking)
5//! - Liveness analysis (smart move/clone inference)
6//! - The repair engine (error fix candidate generation)
7//!
8//! The MIR is lowered from AST before bytecode compilation. Analysis results
9//! (`BorrowAnalysis`) are shared by the compiler, LSP, and diagnostic engine.
10
11pub mod analysis;
12pub mod cfg;
13pub mod field_analysis;
14pub mod liveness;
15pub mod lowering;
16pub mod repair;
17pub mod solver;
18pub mod storage_planning;
19pub mod types;
20
21pub use analysis::{BorrowAnalysis, BorrowErrorCode, BorrowErrorKind, FunctionBorrowSummary};
22pub use cfg::ControlFlowGraph;
23pub use field_analysis::FieldAnalysis;
24pub use liveness::LivenessResult;
25pub use storage_planning::StoragePlan;
26pub use types::*;