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;
11mod types;
12
13pub use display::display_function;
14pub use ir::{
15 Block, BlockId, Constant, Decorator, DefRef, Function, Inst, InstKind, RecordFields, Reg,
16 RtType, Terminator, TypeArg,
17};
18pub use items::{ItemIndex, ItemRef};
19pub use lower::lower;
20pub use types::{rt_type, type_def, type_name};
21
22#[cfg(test)]
23mod tests;