Expand description
RIR instruction definitions.
Instructions are stored in a dense array and referenced by index. This provides good cache locality and efficient traversal.
Structs§
- Function
Span - Stored representation of directive in the extra array. Layout: [name: u32, span_start: u32, span_len: u32, args_len: u32, args…] Variable size due to args. A span marking the boundaries of a function in the RIR.
- Inst
- A single RIR instruction.
- InstRef
- A reference to an instruction in the RIR.
- Rir
- The complete RIR for a source file.
- RirCall
Arg - An argument in a function call.
- RirDestructure
Field - A decoded destructure field from the extra array.
- RirDirective
- A directive in the RIR (e.g., @allow(unused_variable))
- RirExtern
Fn - ADR-0085: a body-less extern fn declared inside a
link_extern("…") { … }block. - RirFunction
View - A view into a function’s instructions within the RIR.
- RirParam
- A parameter in a function declaration.
- RirPattern
Binding - A binding in a data variant pattern.
- RirStruct
Field - A field in an ADR-0051
RirPattern::Structarm, carrying the matched field’s name plus its recursive sub-pattern. - RirStruct
Pattern Binding - A named field binding in a struct variant pattern.
Enums§
- Inst
Data - Instruction data - the actual operation.
- Pattern
Kind - Stored representation of match arm in the extra array. Layout: pattern data + [body: u32] Pattern data varies by kind (see PatternKind enum). Pattern kinds encoded in extra array
- RirArg
Mode - Argument passing mode in RIR.
- RirLink
Mode - ADR-0086: mirrors
gruel_parser::ast::LinkModeafter astgen. - RirParam
Mode - Parameter passing mode in RIR.
- RirPattern
- A pattern in a match expression (RIR level - untyped).