Operand
public enum Operand : Sendable
extension Operand: Equatable
extension Operand: Hashable
extension Operand: CustomStringConvertible
An instruction operand.
-
The result of
instruction.Declaration
Swift
case register(InstructionID) -
A constant value.
Declaration
Swift
case constant(any Constant) -
The void constant.
Declaration
Swift
public static let void: Operand -
Returns a built-in Boolean constant.
Declaration
Swift
public static func i1(_ v: Bool) -> Operand -
Returns a built-in integer constant with the size of a machine word.
Declaration
Swift
public static func word(_ v: Int) -> Operand -
The ID of the function in which the operand is defined, if any.
Declaration
Swift
public var function: Function.ID? { get } -
The ID of the block in which the operand is defined, if any.
Declaration
Swift
public var block: Block.ID? { get } -
The ID of the instruction that produces this operand, if any.
Declaration
Swift
public var instruction: InstructionID? { get } -
The payload if
selfis.constant, ornilotherwise.Declaration
Swift
public var constant: (any Constant)? { get } -
trueiffselfis.constant.Declaration
Swift
public var isConstant: Bool { get } -
Declaration
Swift
public static func == (l: `Self`, r: `Self`) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher) -
Declaration
Swift
public var description: String { get }
View on GitHub