Show / Hide Table of Contents

    Class NamedInstruction

    A named instruction in the context of a control-flow graph.

    Inheritance
    System.Object
    NamedInstruction
    Implements
    System.IEquatable<NamedInstruction>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Flame.Compiler
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class NamedInstruction : IEquatable<NamedInstruction>

    Properties

    | Improve this Doc View Source

    Arguments

    Gets the list of values this instruction takes as arguments.

    Declaration
    public IReadOnlyList<ValueTag> Arguments { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyList<ValueTag>
    | Improve this Doc View Source

    Block

    Gets the basic block that defines this named instruction.

    Declaration
    public BasicBlock Block { get; }
    Property Value
    Type Description
    BasicBlock

    The basic block.

    | Improve this Doc View Source

    Instruction

    Gets the actual instruction behind this instruction selector.

    Declaration
    public Instruction Instruction { get; }
    Property Value
    Type Description
    Instruction

    The instruction.

    | Improve this Doc View Source

    InstructionIndex

    Gets the index of this instruction in the defining block's list of instructions.

    Declaration
    public int InstructionIndex { get; }
    Property Value
    Type Description
    System.Int32

    The instruction index.

    | Improve this Doc View Source

    NextInstructionOrNull

    Gets the next instruction in the basic block that defines this instruction. Returns null if there is no such instruction.

    Declaration
    public NamedInstruction NextInstructionOrNull { get; }
    Property Value
    Type Description
    NamedInstruction

    The next instruction or null.

    | Improve this Doc View Source

    PreviousInstructionOrNull

    Gets the previous instruction in the basic block that defines this instruction. Returns null if there is no such instruction.

    Declaration
    public NamedInstruction PreviousInstructionOrNull { get; }
    Property Value
    Type Description
    NamedInstruction

    The previous instruction or null.

    | Improve this Doc View Source

    Prototype

    Gets the named instruction's prototype.

    Declaration
    public InstructionPrototype Prototype { get; }
    Property Value
    Type Description
    InstructionPrototype
    | Improve this Doc View Source

    ResultType

    Gets the named instruction's result type.

    Declaration
    public IType ResultType { get; }
    Property Value
    Type Description
    IType
    | Improve this Doc View Source

    Tag

    Gets the tag assigned to this instruction.

    Declaration
    public ValueTag Tag { get; }
    Property Value
    Type Description
    ValueTag

    The instruction's tag.

    Methods

    | Improve this Doc View Source

    Equals(NamedInstruction)

    Tests if this named instruction is the same instruction as another named instruction.

    Declaration
    public bool Equals(NamedInstruction other)
    Parameters
    Type Name Description
    NamedInstruction other

    The other named instruction.

    Returns
    Type Description
    System.Boolean

    true if this named instruction is the same as the other named instruction; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)
    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()
    | Improve this Doc View Source

    InsertAfter(Instruction)

    Inserts a particular instruction just after this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertAfter(Instruction instruction)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    InsertAfter(Instruction, ValueTag)

    Inserts a particular instruction just after this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertAfter(Instruction instruction, ValueTag tag)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    ValueTag tag

    The instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    InsertAfter(Instruction, String)

    Inserts a particular instruction just after this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertAfter(Instruction instruction, string name)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    System.String name

    The preferred name for the instruction.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    InsertBefore(Instruction)

    Inserts a particular instruction just before this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertBefore(Instruction instruction)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    InsertBefore(Instruction, ValueTag)

    Inserts a particular instruction just before this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertBefore(Instruction instruction, ValueTag tag)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    ValueTag tag

    The instruction's tag.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    InsertBefore(Instruction, String)

    Inserts a particular instruction just before this instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction InsertBefore(Instruction instruction, string name)
    Parameters
    Type Name Description
    Instruction instruction

    The instruction to insert.

    System.String name

    The preferred name for the instruction.

    Returns
    Type Description
    NamedInstruction

    The inserted instruction in a new control-flow graph.

    | Improve this Doc View Source

    ReplaceInstruction(FlowGraph)

    Replaces this instruction with a control-flow graph that implements this instruction. The arity of the control-flow graph's entry point block must match this instruction's arity.

    Declaration
    public NamedInstruction ReplaceInstruction(FlowGraph implementation)
    Parameters
    Type Name Description
    FlowGraph implementation

    A control-flow graph that implements the instruction.

    Returns
    Type Description
    NamedInstruction

    A new instruction in a new control-flow graph.

    | Improve this Doc View Source

    ReplaceInstruction(Instruction)

    Replaces this instruction with another instruction. Returns the new instruction in a new control-flow graph.

    Declaration
    public NamedInstruction ReplaceInstruction(Instruction instruction)
    Parameters
    Type Name Description
    Instruction instruction

    The other instruction to replace this instruction with.

    Returns
    Type Description
    NamedInstruction

    A new instruction in a new control-flow graph.

    Operators

    | Improve this Doc View Source

    Implicit(NamedInstruction to ValueTag)

    Implicitly converts an instruction to its tag.

    Declaration
    public static implicit operator ValueTag(NamedInstruction instruction)
    Parameters
    Type Name Description
    NamedInstruction instruction

    The instruction to convert.

    Returns
    Type Description
    ValueTag

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX