Skip to main content

xur_bytecode/
lib.rs

1//! Xur's bytecode, and lowering resolved syntax to it.
2//!
3//! Each function becomes a control-flow graph of basic blocks over virtual
4//! registers (see [`ir`]). The shape is close to Cranelift's IR, so a JIT can
5//! later compile the same code the interpreter runs.
6
7mod display;
8pub mod ir;
9mod items;
10mod lower;
11
12pub use display::display_function;
13pub use ir::{
14    Block, BlockId, Constant, DefRef, Function, Inst, InstKind, Reg, RtType, Terminator, TypeArg,
15};
16pub use items::{ItemIndex, ItemRef};
17pub use lower::lower;
18
19#[cfg(test)]
20mod tests;