Skip to main content

Crate gruel_rir

Crate gruel_rir 

Source
Expand description

Gruel Intermediate Representation (RIR) - Untyped IR.

RIR is the first IR in the Gruel compiler pipeline. It is generated from the AST and represents a lowered, linearized form of the program.

Key characteristics:

  • Untyped: type information is not yet resolved
  • Per-file: generated for each source file
  • Dense encoding: instructions stored in arrays, referenced by index

Inspired by Zig’s ZIR (Zig Intermediate Representation).

Re-exports§

pub use inst::FunctionSpan;
pub use inst::Inst;
pub use inst::InstData;
pub use inst::InstRef;
pub use inst::Rir;
pub use inst::RirArgMode;
pub use inst::RirCallArg;
pub use inst::RirDestructureField;
pub use inst::RirDirective;
pub use inst::RirFunctionView;
pub use inst::RirLinkMode;
pub use inst::RirParam;
pub use inst::RirParamMode;
pub use inst::RirPattern;
pub use inst::RirPatternBinding;
pub use inst::RirStructPatternBinding;

Modules§

inst
RIR instruction definitions.

Structs§

AstGen
Generates RIR from an AST.
RirPrinter
Printer for RIR that resolves symbols to their string values.