Skip to main content

Module inst

Module inst 

Source
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§

FunctionSpan
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.
RirCallArg
An argument in a function call.
RirDestructureField
A decoded destructure field from the extra array.
RirDirective
A directive in the RIR (e.g., @allow(unused_variable))
RirExternFn
ADR-0085: a body-less extern fn declared inside a link_extern("…") { … } block.
RirFunctionView
A view into a function’s instructions within the RIR.
RirParam
A parameter in a function declaration.
RirPatternBinding
A binding in a data variant pattern.
RirStructField
A field in an ADR-0051 RirPattern::Struct arm, carrying the matched field’s name plus its recursive sub-pattern.
RirStructPatternBinding
A named field binding in a struct variant pattern.

Enums§

InstData
Instruction data - the actual operation.
PatternKind
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
RirArgMode
Argument passing mode in RIR.
RirLinkMode
ADR-0086: mirrors gruel_parser::ast::LinkMode after astgen.
RirParamMode
Parameter passing mode in RIR.
RirPattern
A pattern in a match expression (RIR level - untyped).