Show / Hide Table of Contents

    Class NamedInstructionBuilder

    A named instruction in a mutable control-flow graph builder.

    Inheritance
    System.Object
    InstructionBuilder
    NamedInstructionBuilder
    Implements
    System.IEquatable<NamedInstructionBuilder>
    Inherited Members
    InstructionBuilder.ReplaceInstruction(FlowGraph)
    InstructionBuilder.InsertBefore(Instruction, String)
    InstructionBuilder.InsertBefore(Instruction)
    InstructionBuilder.ResultType
    InstructionBuilder.Prototype
    InstructionBuilder.Arguments
    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 NamedInstructionBuilder : InstructionBuilder, IEquatable<NamedInstructionBuilder>

    Properties

    | Improve this Doc View Source

    Block

    Gets the basic block that defines this instruction.

    Declaration
    public override BasicBlockBuilder Block { get; }
    Property Value
    Type Description
    BasicBlockBuilder

    A basic block builder.

    Overrides
    InstructionBuilder.Block
    | Improve this Doc View Source

    Graph

    Gets the control-flow graph builder that defines this instruction.

    Declaration
    public override FlowGraphBuilder Graph { get; }
    Property Value
    Type Description
    FlowGraphBuilder

    A control-flow graph builder.

    Overrides
    InstructionBuilder.Graph
    | Improve this Doc View Source

    Instruction

    Gets the actual instruction behind this instruction selector.

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

    The instruction.

    Overrides
    InstructionBuilder.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

    IsValid

    Tells if this instruction builder is still valid, that is, it has not been removed from its control-flow graph builder's set of instructions.

    Declaration
    public override bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instruction builder is still valid; otherwise, false.

    Overrides
    InstructionBuilder.IsValid
    | 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 NamedInstructionBuilder NextInstructionOrNull { get; }
    Property Value
    Type Description
    NamedInstructionBuilder

    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 NamedInstructionBuilder PreviousInstructionOrNull { get; }
    Property Value
    Type Description
    NamedInstructionBuilder

    The previous instruction or null.

    | Improve this Doc View Source

    Tag

    Gets this instruction's tag.

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

    The instruction's tag.

    Methods

    | Improve this Doc View Source

    Equals(NamedInstructionBuilder)

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

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

    The other instruction builder.

    Returns
    Type Description
    System.Boolean

    true if this instruction builder is the same as the other instruction builder; 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 inserted instruction builder.

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

    The instruction to insert.

    Returns
    Type Description
    NamedInstructionBuilder

    The inserted instruction.

    | Improve this Doc View Source

    InsertAfter(Instruction, ValueTag)

    Inserts a particular instruction just after this instruction. Returns the inserted instruction builder.

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

    The instruction to insert.

    ValueTag tag

    The tag to assign to the instruction.

    Returns
    Type Description
    NamedInstructionBuilder

    The inserted instruction.

    | Improve this Doc View Source

    InsertAfter(Instruction, String)

    Inserts a particular instruction just after this instruction. Returns the inserted instruction builder.

    Declaration
    public NamedInstructionBuilder 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
    NamedInstructionBuilder

    The inserted instruction.

    | Improve this Doc View Source

    InsertBefore(Instruction, ValueTag)

    Inserts a particular instruction just before this instruction. Returns the inserted instruction builder.

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

    The instruction to insert.

    ValueTag tag

    The tag to assign to the instruction.

    Returns
    Type Description
    NamedInstructionBuilder

    The inserted instruction.

    Overrides
    InstructionBuilder.InsertBefore(Instruction, ValueTag)
    | Improve this Doc View Source

    MoveTo(BasicBlockTag)

    Moves this instruction from its current location to a the end of a basic block.

    Declaration
    public void MoveTo(BasicBlockTag block)
    Parameters
    Type Name Description
    BasicBlockTag block

    The block to move this instruction to.

    | Improve this Doc View Source

    MoveTo(Int32, BasicBlockTag)

    Moves this instruction from its current location to a particular position in a block.

    Declaration
    public void MoveTo(int index, BasicBlockTag block)
    Parameters
    Type Name Description
    System.Int32 index

    The position in block at which to insert this instruction.

    BasicBlockTag block

    The block to move this instruction to.

    | Improve this Doc View Source

    ReplaceInstruction(FlowGraph, IReadOnlyList<ValueTag>)

    Replaces this instruction with a control-flow graph that implements this instruction.

    Declaration
    public override void ReplaceInstruction(FlowGraph implementation, IReadOnlyList<ValueTag> arguments)
    Parameters
    Type Name Description
    FlowGraph implementation

    A control-flow graph that implements the instruction.

    System.Collections.Generic.IReadOnlyList<ValueTag> arguments

    A list of arguments to pass to implementation's entry point block.

    Overrides
    InstructionBuilder.ReplaceInstruction(FlowGraph, IReadOnlyList<ValueTag>)
    | Improve this Doc View Source

    ToImmutable()

    Gets an immutable version of this instruction, that is, this instruction but selected in an immutable version of the current state of the IR builder.

    Declaration
    public NamedInstruction ToImmutable()
    Returns
    Type Description
    NamedInstruction

    An immutable version.

    Operators

    | Improve this Doc View Source

    Implicit(NamedInstructionBuilder to ValueTag)

    Implicitly converts an instruction to its tag.

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

    The instruction to convert.

    Returns
    Type Description
    ValueTag

    Implements

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