machv

Target-neutral semantic machine IR

compiler
machine-ir
codegen
jit
moon add Milky2018/machv@0.8.2
Download zip
Author
Version
0.8.2
License
Apache-2.0
Last updated
2 days ago
Downloads
164
README

#machv

MachV provides the target-neutral semantic machine IR and the shared storage contracts used after target instruction selection.

#Packages

  • Milky2018/machv: typed target-neutral SSA, builders, cleanup, printing, and verification.
  • Milky2018/machv/vcode: generic dense Target VCode storage parameterized by a target-owned instruction type, plus allocation, frame, and final-emission input contracts.
  • Milky2018/machv/code_object: verified, unlinked machine code plus typed relocations, traps, safepoints, roots, and unwind bytes.

The VCode package does not define a union of AArch64 and x64 instructions. Each target supplies its own closed instruction type, while the shared package stores CFG edges, SSA values, stable instruction handles, operand constraints, soft physical-register preferences, clobbers, safepoints, and allocation edits.

The VCode package also owns the pure call-transfer planner shared by machine targets. After allocation, targets normalize ABI register and outgoing-stack destinations into one atomic transfer request. The planner captures stack arguments before destructive register moves, resolves register cycles, protects safepoint root homes, and returns a verified ordered plan. ABI layout, frame offsets, and instruction encoding remain target-owned.

VCode models AArch64/x64 hardware aliasing directly: scalar floating-point and SIMD values share one FpVector register bank. They can never be allocated to the same physical register as if the hardware exposed independent banks.

#Pipeline boundary

Target lowering consumes verified semantic MachV and produces a complete Function[TargetInst]. Register allocation reads the compact operand side tables and returns a separate Allocation; it does not rewrite Target VCode. Frame planning and emission consume the same stable instruction and program point handles.

The aggregate target compile entry points report TargetCompileEvent boundaries around allocation, frame planning, and emission. The allocation completion event carries AllocationStatistics, including edge-transfer classification, while keeping timing and reporting policy embedding-owned.

The public checkpoints are:

  1. selected Target VCode SSA;
  2. Target VCode plus Allocation;
  3. Target VCode, Allocation, and FrameLayout;
  4. verified unlinked code object.

Every checkpoint returns a structured error for malformed input.

#Embedding environment fields

Semantic MachV keeps embedding context access explicit as EnvironmentField(field, stability). Stable means the embedding guarantees the field value is unchanged for one function invocation; Mutable does not grant that reuse permission. A target may rematerialize either form, but it may reuse only stable fields according to its own instruction and register-pressure cost model. Field offsets and runtime layout remain embedding-provided ABI data.

Function::environment_field_use_groups derives target-neutral field/context occurrence groups, call-free regions, context use counts, and the conservative fact that a stable result can replace an exclusive context carrier. It does not choose whether a target should keep the value live; that profitability policy belongs to target lowering.

#
MachVVerifyError

pub suberror MachVVerifyError {
EmptyFunction
InvalidFunction(message~ : String)
ForeignValue(value_id~ : Int)
ForeignBlock(block_id~ : Int)
ForeignInstruction(instruction_id~ : Int)
ForeignStackObject(object_id~ : Int)
InvalidStackObject(object_id~ : Int, message~ : String)
TerminatorAlreadySet(block_id~ : Int)
MissingTerminator(block_id~ : Int)
EntryHasBlockParameters
EntryHasPredecessor(block_id~ : Int)
UnreachableBlock(block_id~ : Int)
InvalidValueDefinition(value_id~ : Int)
DuplicateValueDefinition(value_id~ : Int)
DuplicateInstructionMembership(instruction_id~ : Int)
OrphanInstruction(instruction_id~ : Int)
RemovedValueUse(value_id~ : Int)
UseBeforeDefinition(value_id~ : Int, block_id~ : Int, instruction_id~ : Int)
NonDominatingUse(value_id~ : Int, defining_block_id~ : Int, use_block_id~ : Int)
InvalidOperation(block_id~ : Int, message~ : String)
InvalidInstruction(block_id~ : Int, instruction_id~ : Int, message~ : String)
InvalidEdge(block_id~ : Int, target_id~ : Int, message~ : String)
InvalidTerminator(block_id~ : Int, message~ : String)
InvalidSafepoint(block_id~ : Int, message~ : String)
MissingGcRoot(block_id~ : Int, instruction_id~ : Int, value_id~ : Int)
InvalidMetadata(block_id~ : Int, message~ : String)
} derive(Eq,
Debug
)

Deterministic structured failures from the semantic MachV checkpoint.

#
AccessWidth

pub(all) enum AccessWidth {
W8
W16
W32
W64
W128
} derive(Eq, Hash,
Debug
)

#
AtomicRmwOp

pub(all) enum AtomicRmwOp {
Add
Sub
And
Or
Xor
Exchange
} derive(Eq, Hash,
Debug
)

#
AtomicSpec

pub struct AtomicSpec {
width : AccessWidth
value_type : ValueType
offset : UInt64
endianness : Endianness
trap : TrapReason?
} derive(Eq, Hash,
Debug
)

A sequentially consistent atomic memory access. Weaker memory orders are not part of the current semantic MachV contract.

#
AtomicSpec::new

fn AtomicSpec::new(width : AccessWidth, value_type : ValueType, offset : UInt64, endianness : Endianness, trap : TrapReason?) -> AtomicSpec

#
Block

pub struct Block {
// private fields
}

Opaque function-owned basic-block handle.
impl Eq for Block
impl Hash for Block

#
CallBehavior

pub struct CallBehavior {
memory : MemoryEffect
may_trap : Bool
may_unwind : Bool
gc_safepoint : Bool
cancellation_safepoint : Bool
returns_twice : Bool
} derive(Eq, Hash,
Debug
)

Explicit call behavior. Protocol and callee identity never imply effects.

#
CallBehavior::conservative

fn CallBehavior::conservative() -> CallBehavior

#
CallBehavior::new

fn CallBehavior::new(memory : MemoryEffect, may_trap : Bool, may_unwind : Bool, gc_safepoint : Bool, cancellation_safepoint : Bool, returns_twice? : Bool) -> CallBehavior

#
CallBehavior::semantics

#
CallProtocol

pub(all) enum CallProtocol {
Internal
Platform
} derive(Eq, Hash,
Debug
)

#
Callee

pub(all) enum Callee {
Internal(CodeSymbol)
External(ExternalSymbol)
Indirect
} derive(Eq, Hash,
Debug
)

#
CleanupStats

pub struct CleanupStats {
aliases_rewritten : Int
instructions_removed : Int
} derive(Eq,
Debug
)

#
CodeSymbol

pub struct CodeSymbol {
name : String
} derive(Eq, Hash,
Debug
)

#
CodeSymbol::new

fn CodeSymbol::new(name : String) -> CodeSymbol

#
ConversionMode

pub(all) enum ConversionMode {
Trapping
Saturating
} derive(Eq, Hash,
Debug
)

#
ConversionOp

pub(all) enum ConversionOp {
I32WrapI64
I64ExtendI32(Signedness)
F32DemoteF64
F64PromoteF32
FloatToInt(FloatType, IntegerType, Signedness, ConversionMode)
IntToFloat(IntegerType, FloatType, Signedness)
SignExtend(IntegerType, AccessWidth)
Bitcast(ValueType, ValueType)
} derive(Eq, Hash,
Debug
)

#
DataSymbol

pub struct DataSymbol {
name : String
} derive(Eq, Hash,
Debug
)

#
DataSymbol::new

fn DataSymbol::new(name : String) -> DataSymbol

#
Edge

pub struct Edge {
target : Block
arguments : Array[Value]
} derive(Eq,
Debug
)

#
Endianness

pub(all) enum Endianness {
Little
Big
} derive(Eq, Hash,
Debug
)

#
EnvironmentField

pub struct EnvironmentField {
name : String
value_type : ValueType
} derive(Eq, Hash,
Debug
)

Opaque embedding-context field identity with its semantic value type.

The identity carries no byte offset or target addressing mode. The embedding target environment resolves it during target lowering.

#
EnvironmentField::new

fn EnvironmentField::new(name : String, value_type : ValueType) -> EnvironmentField

#
EnvironmentFieldStability

pub(all) enum EnvironmentFieldStability {
Stable
Mutable
} derive(Eq, Hash,
Debug
)

Whether an embedding context field may be reused during one function invocation.

Stable grants reuse permission for the invocation. Mutable requires each operation to observe the current field value. Target lowering may rematerialize either form.

#
EnvironmentFieldUseGroup

pub struct EnvironmentFieldUseGroup {
field : EnvironmentField
stability : EnvironmentFieldStability
context : Value
occurrences : Array[Instruction]
call_free_regions : Array[EnvironmentFieldUseRegion]
context_use_count : Int
can_replace_context_carrier : Bool
} derive(Eq,
Debug
)

#
EnvironmentFieldUseRegion

pub struct EnvironmentFieldUseRegion {
block : Block
segment_index : Int
occurrences : Array[Instruction]
} derive(Eq,
Debug
)

#
ExternalSymbol

pub struct ExternalSymbol {
name : String
} derive(Eq, Hash,
Debug
)

#
ExternalSymbol::new

fn ExternalSymbol::new(name : String) -> ExternalSymbol

#
FloatBinaryOp

pub(all) enum FloatBinaryOp {
Add
Sub
Mul
Div
Min
Max
CopySign
} derive(Eq, Hash,
Debug
)

#
FloatComparison

pub(all) enum FloatComparison {
Equal
NotEqual
LessThan
LessOrEqual
GreaterThan
GreaterOrEqual
Ordered
Unordered
} derive(Eq, Hash,
Debug
)

#
FloatTernaryOp

pub(all) enum FloatTernaryOp {
FusedMultiplyAdd
FusedNegatedMultiplyAdd
FusedMultiplySubtract
FusedNegatedMultiplySubtract
} derive(Eq, Hash,
Debug
)

#
FloatType

pub(all) enum FloatType {
F32
F64
} derive(Eq, Hash,
Debug
)

#
FloatUnaryOp

pub(all) enum FloatUnaryOp {
Negate
Absolute
SquareRoot
Ceil
Floor
Truncate
Nearest
} derive(Eq, Hash,
Debug
)

#
Function

pub struct Function {
// private fields
}

A target-neutral semantic machine function.

Storage is private and canonical. Public queries return handles or snapshots; construction and transformation go through owner-aware seams.
impl Show for Function

#
Function::block_count

fn Function::block_count(self : Function) -> Int

#
Function::block_index

fn Function::block_index(self : Function, block : Block) -> Int?

#
Function::block_instructions

fn Function::block_instructions(self : Function, block : Block) -> Array[Instruction]

#
Function::block_parameters

fn Function::block_parameters(self : Function, block : Block) -> Array[Value]

#
Function::block_terminator

fn Function::block_terminator(self : Function, block : Block) -> TerminatorRecord?

#
Function::blocks

fn Function::blocks(self : Function) -> Array[Block]

#
Function::blocks_in_cfg_order

fn Function::blocks_in_cfg_order(self : Function) -> Array[Block]

Return reachable blocks in reverse postorder, followed by any unreachable blocks in stable storage order. Target selectors use this order so every reachable SSA definition is materialized before its dominated uses without making physical block allocation order part of the semantic contract.

#
Function::environment_field_use_groups

fn Function::environment_field_use_groups(self : Function) -> Array[EnvironmentFieldUseGroup]

Analyze environment-field identity and use regions without selecting a target materialization policy.

The input must already be verified. A call starts a new physical-pressure segment, but does not change the semantic stability of a field.

#
Function::instruction_count

fn Function::instruction_count(self : Function) -> Int

#
Function::instruction_index

fn Function::instruction_index(self : Function, instruction : Instruction) -> Int?

#
Function::instruction_metadata

fn Function::instruction_metadata(self : Function, instruction : Instruction) -> InstructionMetadata?

#
Function::instruction_operands

fn Function::instruction_operands(self : Function, instruction : Instruction) -> Array[Value]

#
Function::instruction_operation

fn Function::instruction_operation(self : Function, instruction : Instruction) -> Operation?

#
Function::instruction_results

fn Function::instruction_results(self : Function, instruction : Instruction) -> Array[Value]

#
Function::name

fn Function::name(self : Function) -> String

#
Function::parameters

fn Function::parameters(self : Function) -> Array[Value]

#
Function::print

fn Function::print(self : Function) -> String

Render the complete semantic function in a stable target-neutral form.

#
Function::protocol

fn Function::protocol(self : Function) -> CallProtocol

#
Function::run_mandatory_cleanup

fn Function::run_mandatory_cleanup(self : Function) -> CleanupStats raise MachVVerifyError

Mandatory target-neutral late cleanup. It performs no target or ABI query: visible aliases are canonicalized and unused pure non-trapping operations are removed. Observable effects, traps, calls, and safepoints are retained.

#
Function::signature

fn Function::signature(self : Function) -> Signature

#
Function::stack_object_alignment

fn Function::stack_object_alignment(self : Function, object : StackObject) -> Int?

#
Function::stack_object_size

fn Function::stack_object_size(self : Function, object : StackObject) -> Int?

#
Function::stack_objects

fn Function::stack_objects(self : Function) -> Array[StackObject]

#
Function::value_count

fn Function::value_count(self : Function) -> Int

#
Function::value_index

fn Function::value_index(self : Function, value : Value) -> Int?

#
Function::value_type

fn Function::value_type(self : Function, value : Value) -> ValueType?

#
Function::verify

fn Function::verify(self : Function) -> Unit raise MachVVerifyError

Verify the complete target-neutral MachV checkpoint without consulting a target, ABI, construction history, or mutable validator callback.

#
FunctionBuilder

pub struct FunctionBuilder {
// private fields
}

Owner-aware construction seam for semantic MachV functions.

#
FunctionBuilder::block_parameters

fn FunctionBuilder::block_parameters(self : FunctionBuilder, block : Block) -> Array[Value]

#
FunctionBuilder::branch

fn FunctionBuilder::branch(self : FunctionBuilder, condition : Value, true_target : Block, true_arguments : Array[Value], false_target : Block, false_arguments : Array[Value]) -> Unit

#
FunctionBuilder::create_block

fn FunctionBuilder::create_block(self : FunctionBuilder, parameter_types : Array[ValueType]) -> Block

#
FunctionBuilder::create_stack_object

fn FunctionBuilder::create_stack_object(self : FunctionBuilder, size : Int, alignment : Int) -> StackObject

#
FunctionBuilder::current_block

fn FunctionBuilder::current_block(self : FunctionBuilder) -> Block

#
FunctionBuilder::emit

fn FunctionBuilder::emit(self : FunctionBuilder, operation : Operation, operands : Array[Value], result_types : Array[ValueType]) -> Array[Value]

Append one parameterized semantic operation after validating its local ownership and typed operation contract.

#
FunctionBuilder::emit_with_metadata

fn FunctionBuilder::emit_with_metadata(self : FunctionBuilder, operation : Operation, operands : Array[Value], result_types : Array[ValueType], metadata : InstructionMetadata) -> Array[Value]

#
FunctionBuilder::entry_block

fn FunctionBuilder::entry_block(self : FunctionBuilder) -> Block

#
FunctionBuilder::finish

Verify the constructed function, run mandatory target-neutral cleanup, and verify the resulting function again.

#
FunctionBuilder::jump

fn FunctionBuilder::jump(self : FunctionBuilder, target : Block, arguments : Array[Value]) -> Unit

#
FunctionBuilder::new

fn FunctionBuilder::new(name : String, protocol : CallProtocol, params : Array[ValueType], results : Array[ValueType]) -> FunctionBuilder

#
FunctionBuilder::noreturn_call

fn FunctionBuilder::noreturn_call(self : FunctionBuilder, call : SemanticCall, operands : Array[Value]) -> Unit

#
FunctionBuilder::noreturn_call_with_metadata

fn FunctionBuilder::noreturn_call_with_metadata(self : FunctionBuilder, call : SemanticCall, operands : Array[Value], metadata : TerminatorMetadata) -> Unit

#
FunctionBuilder::parameters

fn FunctionBuilder::parameters(self : FunctionBuilder) -> Array[Value]

#
FunctionBuilder::return_

fn FunctionBuilder::return_(self : FunctionBuilder, values : Array[Value]) -> Unit

#
FunctionBuilder::set_terminator_source

fn FunctionBuilder::set_terminator_source(self : FunctionBuilder, source : SourceLocation) -> Unit

Attach a source location to the current block terminator without exposing mutable terminator storage.

#
FunctionBuilder::switch

fn FunctionBuilder::switch(self : FunctionBuilder, index : Value, cases : Array[(UInt64, Block, Array[Value])], default_target : Block, default_arguments : Array[Value]) -> Unit

#
FunctionBuilder::switch_to_block

fn FunctionBuilder::switch_to_block(self : FunctionBuilder, block : Block) -> Unit

#
FunctionBuilder::tail_call

fn FunctionBuilder::tail_call(self : FunctionBuilder, call : SemanticCall, operands : Array[Value]) -> Unit

#
FunctionBuilder::tail_call_with_metadata

fn FunctionBuilder::tail_call_with_metadata(self : FunctionBuilder, call : SemanticCall, operands : Array[Value], metadata : TerminatorMetadata) -> Unit

#
FunctionBuilder::trap

fn FunctionBuilder::trap(self : FunctionBuilder, reason : TrapReason) -> Unit

#
Instruction

pub struct Instruction {
// private fields
}

Opaque function-owned instruction handle.
impl Eq for Instruction
impl Hash for Instruction

#
InstructionMetadata

pub struct InstructionMetadata {
source : SourceLocation?
live_gc_roots : Array[Value]
stack_map : StackMapMetadata?
} derive(Eq,
Debug
)

#
InstructionMetadata::empty

#
InstructionMetadata::new

fn InstructionMetadata::new(source : SourceLocation?, live_gc_roots : Array[Value], stack_map? : StackMapMetadata) -> InstructionMetadata

#
IntBinaryOp

pub(all) enum IntBinaryOp {
Add
Sub
Mul
SignedDiv
UnsignedDiv
SignedRem
UnsignedRem
And
Or
Xor
ShiftLeft
SignedShiftRight
UnsignedShiftRight
RotateLeft
RotateRight
} derive(Eq, Hash,
Debug
)

#
IntComparison

pub(all) enum IntComparison {
Equal
NotEqual
SignedLessThan
SignedLessOrEqual
SignedGreaterThan
SignedGreaterOrEqual
UnsignedLessThan
UnsignedLessOrEqual
UnsignedGreaterThan
UnsignedGreaterOrEqual
} derive(Eq, Hash,
Debug
)

#
IntOverflowOp

pub(all) enum IntOverflowOp {
Add(Signedness)
Sub(Signedness)
Mul(Signedness)
} derive(Eq, Hash,
Debug
)

#
IntUnaryOp

pub(all) enum IntUnaryOp {
Not
CountLeadingZeros
CountTrailingZeros
PopulationCount
} derive(Eq, Hash,
Debug
)

#
IntegerType

pub(all) enum IntegerType {
I32
I64
} derive(Eq, Hash,
Debug
)

#
LoadExtension

pub(all) enum LoadExtension {
None
Signed
Unsigned
} derive(Eq, Hash,
Debug
)

#
LoadSpec

pub struct LoadSpec {
width : AccessWidth
extension : LoadExtension
result_type : ValueType
offset : UInt64
endianness : Endianness
trap : TrapReason?
} derive(Eq, Hash,
Debug
)

#
LoadSpec::new

fn LoadSpec::new(width : AccessWidth, extension : LoadExtension, result_type : ValueType, offset : UInt64, endianness : Endianness, trap : TrapReason?) -> LoadSpec

#
MemoryEffect

pub(all) enum MemoryEffect {
None
Read
Write
ReadWrite
} derive(Eq, Hash,
Debug
)

#
Operation

pub(all) enum Operation {
I32Const(UInt)
I64Const(UInt64)
F32Const(UInt)
F64Const(UInt64)
V128Const(UInt64, UInt64)
NullPtr
NullGcRef
CodeAddress(CodeSymbol)
ExternalAddress(ExternalSymbol)
DataAddress(DataSymbol)
EnvironmentField(EnvironmentField, EnvironmentFieldStability)
StackAddress(StackObject)
Copy
Select
GcRefAddress
GcRefFromBits
PointerOffset
ReferenceCompare(ReferenceComparison)
IntUnary(IntUnaryOp)
IntBinary(IntBinaryOp)
IntHighMultiply(Signedness)
IntWithOverflow(IntOverflowOp)
IntCompare(IntComparison)
FloatUnary(FloatUnaryOp)
FloatBinary(FloatBinaryOp)
FloatTernary(FloatTernaryOp)
FloatCompare(FloatComparison)
Convert(ConversionOp)
Load(LoadSpec)
Store(StoreSpec)
AtomicLoad(AtomicSpec)
AtomicStore(AtomicSpec)
AtomicRmw(AtomicSpec, AtomicRmwOp)
AtomicCompareExchange(AtomicSpec)
AtomicFence
Vector(VectorOp)
VectorLoad(VectorLoadSpec)
VectorStoreLane(VectorStoreLaneSpec)
Call(SemanticCall)
Safepoint(SafepointKind)
} derive(Eq,
Debug
)

#
Operation::semantics

fn Operation::semantics(self : Operation) -> OperationSemantics

#
OperationSemantics

pub struct OperationSemantics {
memory : MemoryEffect
may_trap : Bool
may_unwind : Bool
gc_safepoint : Bool
cancellation_safepoint : Bool
returns_twice : Bool
} derive(Eq, Hash,
Debug
)

Canonical observable behavior of one semantic operation.

#
OperationSemantics::must_preserve_if_unused

fn OperationSemantics::must_preserve_if_unused(self : OperationSemantics) -> Bool

#
OperationSemantics::pure

#
ReferenceComparison

pub(all) enum ReferenceComparison {
Equal
NotEqual
} derive(Eq, Hash,
Debug
)

#
SafepointKind

pub(all) enum SafepointKind {
Gc
Cancellation
GcAndCancellation
} derive(Eq, Hash,
Debug
)

#
SemanticCall

pub struct SemanticCall {
callee : Callee
signature : Signature
protocol : CallProtocol
behavior : CallBehavior
} derive(Eq, Hash,
Debug
)

#
SemanticCall::new

fn SemanticCall::new(callee : Callee, signature : Signature, protocol : CallProtocol, behavior : CallBehavior) -> SemanticCall

#
Signature

pub struct Signature {
params : Array[ValueType]
results : Array[ValueType]
} derive(Eq, Hash,
Debug
)

Ordered logical parameters and results. ABI placement is intentionally absent.

#
Signature::new

fn Signature::new(params : Array[ValueType], results : Array[ValueType]) -> Signature

#
Signedness

pub(all) enum Signedness {
Signed
Unsigned
} derive(Eq, Hash,
Debug
)

#
SourceLocation

pub struct SourceLocation {
file : String
line : Int
column : Int
} derive(Eq, Hash,
Debug
)

#
SourceLocation::new

fn SourceLocation::new(file : String, line : Int, column : Int) -> SourceLocation

#
StackMapMetadata

pub struct StackMapMetadata {
id : Int
argument_root_count : Int
} derive(Eq,
Debug
)

#
StackMapMetadata::new

fn StackMapMetadata::new(id : Int, argument_root_count~ : Int) -> StackMapMetadata

#
StackObject

pub struct StackObject {
// private fields
}

Opaque function-owned address-visible stack object handle.
impl Eq for StackObject
impl Hash for StackObject

#
StoreSpec

pub struct StoreSpec {
width : AccessWidth
value_type : ValueType
offset : UInt64
endianness : Endianness
trap : TrapReason?
} derive(Eq, Hash,
Debug
)

#
StoreSpec::new

fn StoreSpec::new(width : AccessWidth, value_type : ValueType, offset : UInt64, endianness : Endianness, trap : TrapReason?) -> StoreSpec

#
SwitchCase

pub struct SwitchCase {
bits : UInt64
edge : Edge
} derive(Eq,
Debug
)

#
Terminator

pub(all) enum Terminator {
Jump(Edge)
Branch(Value, Edge, Edge)
Switch(Value, Array[SwitchCase], Edge)
Return(Array[Value])
TailCall(SemanticCall, Array[Value])
NoReturnCall(SemanticCall, Array[Value])
Trap(TrapReason)
} derive(Eq,
Debug
)

#
TerminatorMetadata

pub struct TerminatorMetadata {
source : SourceLocation?
live_gc_roots : Array[Value]
} derive(Eq,
Debug
)

#
TerminatorMetadata::empty

#
TerminatorMetadata::new

fn TerminatorMetadata::new(source : SourceLocation?, live_gc_roots : Array[Value]) -> TerminatorMetadata

#
TerminatorRecord

pub struct TerminatorRecord {
kind : Terminator
metadata : TerminatorMetadata
} derive(Eq,
Debug
)

#
TrapReason

pub(all) enum TrapReason {
Unreachable
IntegerDivisionByZero
IntegerOverflow
InvalidConversionToInteger
MemoryOutOfBounds
TableOutOfBounds
IndirectCallTypeMismatch
NullReference
UnalignedAtomic
UnsupportedOperation
StackOverflow
User(Int)
} derive(Eq, Hash,
Debug
)

#
Value

pub struct Value {
// private fields
}

Opaque function-owned SSA value handle.
impl Eq for Value
impl Hash for Value

#
ValueType

pub(all) enum ValueType {
I32
I64
F32
F64
V128
Ptr64
GcRef64
} derive(Eq, Hash,
Debug
)

Exact target-neutral value types carried by semantic MachV SSA values.

Ptr64 is an untraced address or opaque handle. GcRef64 is a nullable managed reference and must be reported as a root at GC safepoints.
impl Show for ValueType

#
VectorBitwiseOp

pub(all) enum VectorBitwiseOp {
Not
And
Or
Xor
AndNot
BitSelect
} derive(Eq, Hash,
Debug
)

#
VectorConversionOp

pub(all) enum VectorConversionOp {
ExtendLow(VectorLane, Signedness)
ExtendHigh(VectorLane, Signedness)
Narrow(VectorLane, Signedness)
FloatToInt(VectorLane, VectorLane, Signedness, ConversionMode)
IntToFloat(VectorLane, VectorLane, Signedness)
PromoteLowF32x4
DemoteZeroF64x2
} derive(Eq, Hash,
Debug
)

#
VectorFloatBinaryOp

pub(all) enum VectorFloatBinaryOp {
Add
Sub
Mul
Div
Min
Max
PseudoMin
PseudoMax
} derive(Eq, Hash,
Debug
)

#
VectorFloatComparison

pub(all) enum VectorFloatComparison {
Equal
NotEqual
LessThan
LessOrEqual
GreaterThan
GreaterOrEqual
} derive(Eq, Hash,
Debug
)

#
VectorFloatUnaryOp

pub(all) enum VectorFloatUnaryOp {
Absolute
Negate
SquareRoot
Ceil
Floor
Truncate
Nearest
} derive(Eq, Hash,
Debug
)

#
VectorHalf

pub(all) enum VectorHalf {
Low
High
} derive(Eq, Hash,
Debug
)

#
VectorIntBinaryOp

pub(all) enum VectorIntBinaryOp {
Add
Sub
Mul
Min(Signedness)
Max(Signedness)
AverageUnsigned
SaturatingAdd(Signedness)
SaturatingSub(Signedness)
ExtendMultiply(VectorHalf, Signedness)
Dot16To32Signed
Q15MultiplyRoundedSaturating
} derive(Eq, Hash,
Debug
)

#
VectorIntComparison

pub(all) enum VectorIntComparison {
Equal
NotEqual
LessThan(Signedness)
LessOrEqual(Signedness)
GreaterThan(Signedness)
GreaterOrEqual(Signedness)
} derive(Eq, Hash,
Debug
)

#
VectorIntShiftOp

pub(all) enum VectorIntShiftOp {
Left
Right(Signedness)
} derive(Eq, Hash,
Debug
)

#
VectorIntUnaryOp

pub(all) enum VectorIntUnaryOp {
Absolute
Negate
PopulationCount
ExtendAddPairwise(Signedness)
} derive(Eq, Hash,
Debug
)

#
VectorLane

pub(all) enum VectorLane {
I8x16
I16x8
I32x4
I64x2
F32x4
F64x2
} derive(Eq, Hash,
Debug
)

#
VectorLoadKind

pub(all) enum VectorLoadKind {
Splat(VectorLane)
Extend(VectorLane, Signedness)
Zero(AccessWidth)
Lane(VectorLane, Int)
} derive(Eq, Hash,
Debug
)

#
VectorLoadSpec

pub struct VectorLoadSpec {
kind : VectorLoadKind
offset : UInt64
endianness : Endianness
trap : TrapReason?
} derive(Eq, Hash,
Debug
)

#
VectorLoadSpec::new

fn VectorLoadSpec::new(kind : VectorLoadKind, offset : UInt64, endianness : Endianness, trap : TrapReason?) -> VectorLoadSpec

#
VectorOp

pub(all) enum VectorOp {
Splat(VectorLane)
ExtractLane(VectorLane, Int, Signedness?)
ReplaceLane(VectorLane, Int)
Shuffle(FixedArray[Int])
Swizzle
Bitwise(VectorBitwiseOp)
IntUnary(VectorLane, VectorIntUnaryOp)
IntBinary(VectorLane, VectorIntBinaryOp)
IntShift(VectorLane, VectorIntShiftOp)
IntCompare(VectorLane, VectorIntComparison)
FloatUnary(VectorLane, VectorFloatUnaryOp)
FloatBinary(VectorLane, VectorFloatBinaryOp)
FloatTernary(VectorLane, FloatTernaryOp)
FloatCompare(VectorLane, VectorFloatComparison)
Predicate(VectorPredicateOp)
Convert(VectorConversionOp)
Relaxed(VectorRelaxedOp)
} derive(Eq,
Debug
)

#
VectorPredicateOp

pub(all) enum VectorPredicateOp {
AnyTrue
AllTrue(VectorLane)
BitMask(VectorLane)
} derive(Eq, Hash,
Debug
)

#
VectorRelaxedOp

pub(all) enum VectorRelaxedOp {
Swizzle
FloatToInt(VectorLane, VectorLane, Signedness)
FusedMultiplyAdd(VectorLane, FloatTernaryOp)
LaneSelect(VectorLane)
Min(VectorLane)
Max(VectorLane)
Q15MultiplyRoundedSigned
Dot8To16Signed
Dot8To32AddSigned
} derive(Eq, Hash,
Debug
)

#
VectorStoreLaneSpec

pub struct VectorStoreLaneSpec {
lane : VectorLane
lane_index : Int
offset : UInt64
endianness : Endianness
trap : TrapReason?
} derive(Eq, Hash,
Debug
)

#
VectorStoreLaneSpec::new

fn VectorStoreLaneSpec::new(lane : VectorLane, lane_index : Int, offset : UInt64, endianness : Endianness, trap : TrapReason?) -> VectorStoreLaneSpec