Skip to main content

Crate cjc_mir_exec

Crate cjc_mir_exec 

Source
Expand description

CJC MIR Executor (Reference Interpreter)

Executes a MIR program by interpreting it directly. This replaces the tree-walk AST interpreter (cjc-eval) with one that operates on the lowered MIR representation.

The behavior must be identical to cjc-eval for all existing programs (Parity Gate G-1 / G-2).

Structs§

MirExecutor

Enums§

MirExecError

Functions§

lower_to_mir
Lower an AST program to MIR and return it (for inspection).
run_program
run_program_cfg
Run a full AST program through the CFG-based MIR pipeline.
run_program_monomorphized
Run a full AST program through the MIR pipeline with monomorphization + optimization.
run_program_optimized
Run a full AST program through the optimized MIR pipeline.
run_program_optimized_with_executor
Run a full AST program through the optimized MIR pipeline, returning executor.
run_program_type_checked
Run a full AST program with the type-checking compile-time gate enabled.
run_program_with_executor
Run a full AST program and return the executor (for inspecting output, etc.)
run_program_with_modules
Run a multi-file CJC program starting from the entry file path.
run_program_with_modules_executor
Run a multi-file CJC program and return the executor for inspection.
type_check_program
Run a full AST program through the HIR -> MIR -> MIR-Exec pipeline. Run the CJC type checker on program.
verify_nogc
Run NoGC verification on a program’s MIR. Returns Ok(()) if clean, or a descriptive error message.

Type Aliases§

MirExecResult