cljrs-ir 0.1.46

Intermediate representation types for clojurust compiler and interpreter
Documentation
//! Pure-Rust ANF lowering, escape analysis, and region optimization.
//!
//! Replaces the Clojure-based `cljrs.compiler.anf` / `cljrs.compiler.escape` /
//! `cljrs.compiler.optimize` pipeline. No interpreter round-trip; operates
//! directly on `Form` AST nodes and produces `IrFunction` structs.

pub mod anf;
pub mod context;
pub mod escape;
pub mod inline;
pub mod known;
pub mod optimize;

pub use anf::{LowerError, lower_fn_body};
pub use escape::{AnalysisResult, EscapeContext, EscapeState, UseInfo, UseKind, analyze};
pub use inline::inline;
pub use optimize::optimize;

/// Build an inter-procedural escape-analysis context for the entire IR tree
/// rooted at `ir_func`.  Pass the result to [`analyze`] (as `Some(&ctx)`) to
/// enable cross-function closure-call resolution.
pub fn make_analysis_context(ir_func: &IrFunction) -> EscapeContext {
    escape::make_context(ir_func)
}

use crate::IrFunction;