Skip to main content

Module ir

Module ir 

Source
Expand description

The instruction set.

A Function is a control-flow graph of Blocks over virtual registers. Each block runs its instructions in order and ends in a Terminator that picks the next block. Registers hold dynamically typed values; nothing here assumes types, so the same code can be interpreted or, later, compiled by a JIT that specialises it.

Structs§

Block
BlockId
A basic block of a function; BlockId(0) is the entry.
Decorator
A decorator applied to a function: #[decorate(wrapper)] or #[decorate(wrapper(1, "tag"))].
Function
Inst
Reg
A virtual register of a function.

Enums§

Constant
DefRef
A definition used as a value.
InstKind
RecordFields
The fields a record is built with.
RtType
A type written in the source, as checked at runtime. Xur is checked dynamically: where a type is written it is enforced when the value arrives, and where it isn’t (or is generic) anything goes.
Terminator
TypeArg
A type argument of a call, as in type_name::<T>().