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