Search Results for

    Show / Hide Table of Contents

    Class NamedInstructionBuilder

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

    Inheritance
    object
    InstructionBuilder
    NamedInstructionBuilder
    Implements
    IEquatable<NamedInstructionBuilder>
    Inherited Members
    InstructionBuilder.ReplaceInstruction(FlowGraph)
    InstructionBuilder.InsertBefore(Instruction, string)
    InstructionBuilder.InsertBefore(Instruction)
    InstructionBuilder.ResultType
    InstructionBuilder.Prototype
    InstructionBuilder.Arguments
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class NamedInstructionBuilder : InstructionBuilder, IEquatable<NamedInstructionBuilder>

    Properties

    | Edit this page 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
    | Edit this page 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
    | Edit this page 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
    | Edit this page 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
    int

    The instruction index.

    | Edit this page 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
    bool

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

    Overrides
    InstructionBuilder.IsValid
    | Edit this page 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.

    | Edit this page 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.

    | Edit this page View Source

    Tag

    Gets this instruction's tag.

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

    The instruction's tag.

    Methods

    | Edit this page 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
    bool

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

    | Edit this page View Source

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)
    | Edit this page View Source

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()
    | Edit this page 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.

    | Edit this page 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.

    | Edit this page 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.

    string name

    The preferred name for the instruction.

    Returns
    Type Description
    NamedInstructionBuilder

    The inserted instruction.

    | Edit this page 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)
    | Edit this page 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.

    | Edit this page View Source

    MoveTo(int, 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
    int index

    The position in block at which to insert this instruction.

    BasicBlockTag block

    The block to move this instruction to.

    | Edit this page 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.

    IReadOnlyList<ValueTag> arguments

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

    Overrides
    InstructionBuilder.ReplaceInstruction(FlowGraph, IReadOnlyList<ValueTag>)
    | Edit this page 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

    | Edit this page View Source

    implicit operator ValueTag(NamedInstructionBuilder)

    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

    IEquatable<T>
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX