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 return_ownership;
18pub mod solver;
19pub mod storage_planning;
20pub mod types;
21
22pub use analysis::{
23 BorrowAnalysis, BorrowErrorCode, BorrowErrorKind, FunctionBorrowSummary, ReturnOwnershipMode,
24};
25pub use cfg::ControlFlowGraph;
26pub use field_analysis::FieldAnalysis;
27pub use liveness::LivenessResult;
28pub use storage_planning::StoragePlan;
29pub use types::*;