DoxigAlpha

Inst

These are untyped instructions generated from an Abstract Syntax Tree. The data here is immutable because it is possible to have multiple analyses on the same ZIR happening at the same time.

Fields of this type

Fields

#

These names are used directly as the instruction names in the text format.

Types

#
Tag
These names are used directly as the instruction names in the text format.
Extended
Rarer instructions are here; ones that do not fit in the 8-bit `Tag` enum.
Index
The position of a ZIR instruction within the `Zir` instructions array.
Ref
A reference to ZIR instruction, or to an InternPool index, or neither.
Data
All instructions have an 8-byte payload, which is contained within
Asm
Trailing:
Func
Trailing:
FuncFancy
Trailing:
MultiOp
This data is stored inside extra, with trailing operands according to `operands_len`.
NodeMultiOp
Trailing: operand: Ref, // for each `operands_len` (stored in `small`).
Block
This data is stored inside extra, with trailing operands according to `body_len`.
BlockComptime
Trailing:
BoolBr
Trailing:
Declaration
Trailing:
Call
Stored inside extra, with trailing arguments according to `args_len`.
FieldCall
Stored inside extra, with trailing arguments according to `args_len`.
TypeOfPeer
There is a body of instructions at `extra[body_index..][0..body_len]`.
CondBr
This data is stored inside extra, with two sets of trailing `Ref`:
Try
This data is stored inside extra, trailed by:
PtrType
Stored in extra.
Bin
The meaning of these operands depends on the corresponding `Tag`.
StructDecl
Trailing:
Capture
Represents a single value being captured in a type declaration's closure.
EnumDecl
Trailing:
UnionDecl
Trailing:
OpaqueDecl
Trailing:
TupleDecl
Trailing:
ErrorSetDecl
Trailing:
Float128
A f128 value, broken up into 4 u32 parts.
StructInit
Trailing is an item per field.
StructInitAnon
Trailing is an Item per field.
Param
Trailing: inst: Index // for every body_len
AllocExtended
Trailing:
CompileErrors
Trailing: `CompileErrors.Item` for each `items_len`.
Imports
Trailing: for each `imports_len` there is an Item