pub enum Instr {
Show 36 variants Void, Invalid, Const(Const), Alloca(Type), LogicalNot(OpId), Call { arguments: SmallVec<[OpId; 2]>, generic_arguments: Vec<Type>, func: FuncId, }, ExternCall { arguments: SmallVec<[OpId; 2]>, func: ExternFunctionRef, }, FunctionRef { generic_arguments: Vec<Type>, func: FuncId, }, Intrinsic { arguments: SmallVec<[OpId; 2]>, ty: Type, intr: Intrinsic, }, Import(OpId), Reinterpret(OpIdType), Truncate(OpIdType), SignExtend(OpIdType), ZeroExtend(OpIdType), FloatCast(OpIdType), FloatToInt(OpIdType), IntToFloat(OpIdType), Load(OpId), Store { location: OpId, value: OpId, }, AddressOfStatic(StaticId), Pointer { op: OpId, is_mut: bool, }, Struct { fields: SmallVec<[OpId; 2]>, id: StructId, }, Enum { variants: SmallVec<[OpId; 2]>, id: EnumId, }, FunctionTy { param_tys: Vec<OpId>, ret_ty: OpId, }, StructLit { fields: SmallVec<[OpId; 2]>, id: StructId, }, DirectFieldAccess { val: OpId, index: usize, }, IndirectFieldAccess { val: OpId, index: usize, }, InternalFieldAccess { val: OpId, field: InternalField, }, Variant { enuum: EnumId, index: usize, payload: OpId, }, DiscriminantAccess { val: OpId, }, Ret(OpId), Br(BlockId), CondBr { condition: OpId, true_bb: BlockId, false_bb: BlockId, }, SwitchBr { scrutinee: OpId, cases: Vec<SwitchCase>, catch_all_bb: BlockId, }, GenericParam(GenericParamId), Parameter(Type),
}

Variants

Void

Invalid

Const(Const)

Alloca(Type)

LogicalNot(OpId)

Call

Fields

arguments: SmallVec<[OpId; 2]>
generic_arguments: Vec<Type>
func: FuncId

ExternCall

Fields

arguments: SmallVec<[OpId; 2]>

FunctionRef

Fields

generic_arguments: Vec<Type>
func: FuncId

Intrinsic

Fields

arguments: SmallVec<[OpId; 2]>
ty: Type
intr: Intrinsic

Import(OpId)

Reinterpret(OpIdType)

Truncate(OpIdType)

SignExtend(OpIdType)

ZeroExtend(OpIdType)

FloatCast(OpIdType)

FloatToInt(OpIdType)

IntToFloat(OpIdType)

Load(OpId)

Store

Fields

location: OpId
value: OpId

AddressOfStatic(StaticId)

Pointer

Fields

op: OpId
is_mut: bool

Struct

Fields

Enum

Fields

variants: SmallVec<[OpId; 2]>
id: EnumId

FunctionTy

Fields

param_tys: Vec<OpId>
ret_ty: OpId

StructLit

Fields

DirectFieldAccess

Fields

val: OpId
index: usize

IndirectFieldAccess

Fields

val: OpId
index: usize

InternalFieldAccess

Fields

val: OpId

Variant

Fields

enuum: EnumId
index: usize
payload: OpId

DiscriminantAccess

Fields

val: OpId

Ret(OpId)

Br(BlockId)

CondBr

Fields

condition: OpId
true_bb: BlockId
false_bb: BlockId

SwitchBr

Fields

scrutinee: OpId
cases: Vec<SwitchCase>
catch_all_bb: BlockId

GenericParam(GenericParamId)

Parameter(Type)

Only valid at the beginning of a function, right after the void instruction

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.