Enum peepmatic_runtime::linear::Action[][src]

pub enum Action<TOperator> {
    GetLhs {
        lhs: LhsId,
    },
    UnaryUnquote {
        operator: UnquoteOperator,
        operand: RhsId,
    },
    BinaryUnquote {
        operator: UnquoteOperator,
        operands: [RhsId; 2],
    },
    MakeIntegerConst {
        value: IntegerId,
        bit_width: BitWidth,
    },
    MakeBooleanConst {
        value: bool,
        bit_width: BitWidth,
    },
    MakeConditionCode {
        cc: ConditionCode,
    },
    MakeUnaryInst {
        operand: RhsId,
        type: Type,
        operator: TOperator,
    },
    MakeBinaryInst {
        operator: TOperator,
        type: Type,
        operands: [RhsId; 2],
    },
    MakeTernaryInst {
        operator: TOperator,
        type: Type,
        operands: [RhsId; 3],
    },
}
Expand description

An action to perform when transitioning between states in the automata.

When evaluating actions, the i^th action implicitly defines the RhsId(i).

Variants

GetLhs

Reuse something from the left-hand side.

Fields of GetLhs

lhs: LhsId

The left-hand side instruction or value.

UnaryUnquote

Perform compile-time evaluation.

Fields of UnaryUnquote

operator: UnquoteOperator

The unquote operator.

operand: RhsId

The constant operand to this unquote.

BinaryUnquote

Perform compile-time evaluation.

Fields of BinaryUnquote

operator: UnquoteOperator

The unquote operator.

operands: [RhsId; 2]

The constant operands to this unquote.

MakeIntegerConst

Create an integer constant.

Fields of MakeIntegerConst

value: IntegerId

The constant integer value.

bit_width: BitWidth

The bit width of this constant.

MakeBooleanConst

Create a boolean constant.

Fields of MakeBooleanConst

value: bool

The constant boolean value.

bit_width: BitWidth

The bit width of this constant.

MakeConditionCode

Create a condition code.

Fields of MakeConditionCode

cc: ConditionCode

The condition code.

MakeUnaryInst

Make a unary instruction.

Fields of MakeUnaryInst

operand: RhsId

The operand for this instruction.

type: Type

The type of this instruction’s result.

operator: TOperator

The operator for this instruction.

MakeBinaryInst

Make a binary instruction.

Fields of MakeBinaryInst

operator: TOperator

The opcode for this instruction.

type: Type

The type of this instruction’s result.

operands: [RhsId; 2]

The operands for this instruction.

MakeTernaryInst

Make a ternary instruction.

Fields of MakeTernaryInst

operator: TOperator

The opcode for this instruction.

type: Type

The type of this instruction’s result.

operands: [RhsId; 3]

The operands for this instruction.

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

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.