Search Results for

    Show / Hide Table of Contents

    Class BlockFlow

    Describes control flow at the end of a basic block.

    Inheritance
    object
    BlockFlow
    JumpFlow
    ReturnFlow
    SwitchFlow
    TryFlow
    UnreachableFlow
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Compiler
    Assembly: Flame.Compiler.dll
    Syntax
    public abstract class BlockFlow

    Properties

    | Edit this page View Source

    BranchTargets

    Gets a list of each branch's target.

    Declaration
    public IEnumerable<BasicBlockTag> BranchTargets { get; }
    Property Value
    Type Description
    IEnumerable<BasicBlockTag>

    A list of branch targets.

    | Edit this page View Source

    Branches

    Gets a list of branches this flow may take.

    Declaration
    public abstract IReadOnlyList<Branch> Branches { get; }
    Property Value
    Type Description
    IReadOnlyList<Branch>

    A list of potential branches.

    | Edit this page View Source

    Instructions

    Gets a list of inner instructions for this block flow.

    Declaration
    public abstract IReadOnlyList<Instruction> Instructions { get; }
    Property Value
    Type Description
    IReadOnlyList<Instruction>

    The inner instructions.

    | Edit this page View Source

    Values

    Gets a sequence of all values that are used in this block flow. Multiply used values are appropriately duplicated.

    Declaration
    public IEnumerable<ValueTag> Values { get; }
    Property Value
    Type Description
    IEnumerable<ValueTag>

    A sequence of values.

    Methods

    | Edit this page View Source

    GetInstructionBuilder(BasicBlockBuilder, int)

    Gets an instruction builder for the nth anonymous instruction in this block flow.

    Declaration
    public abstract InstructionBuilder GetInstructionBuilder(BasicBlockBuilder block, int instructionIndex)
    Parameters
    Type Name Description
    BasicBlockBuilder block

    The block that defines this flow.

    int instructionIndex

    The index of the anonymous instruction to create a builder for.

    Returns
    Type Description
    InstructionBuilder

    An instruction builder for an anonymous instruction.

    | Edit this page View Source

    GetInstructionBuilders(BasicBlockBuilder)

    Gets instruction builders for all anonymous instructions in this block flow.

    Declaration
    public IEnumerable<InstructionBuilder> GetInstructionBuilders(BasicBlockBuilder block)
    Parameters
    Type Name Description
    BasicBlockBuilder block

    The block that defines this flow.

    Returns
    Type Description
    IEnumerable<InstructionBuilder>

    A sequence of instruction builders for anonymous instructions.

    | Edit this page View Source

    MapArguments(IReadOnlyDictionary<BranchArgument, BranchArgument>)

    Applies a mapping to all branch arguments in this flow.

    Declaration
    public BlockFlow MapArguments(IReadOnlyDictionary<BranchArgument, BranchArgument> mapping)
    Parameters
    Type Name Description
    IReadOnlyDictionary<BranchArgument, BranchArgument> mapping

    A argument-to-argument mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapArguments(Func<BranchArgument, BranchArgument>)

    Applies a mapping to all branch arguments in this flow.

    Declaration
    public BlockFlow MapArguments(Func<BranchArgument, BranchArgument> mapping)
    Parameters
    Type Name Description
    Func<BranchArgument, BranchArgument> mapping

    A argument-to-argument mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapBlocks(IReadOnlyDictionary<BasicBlockTag, BasicBlockTag>)

    Applies a mapping to all basic blocks referenced by branches in this block flow.

    Declaration
    public BlockFlow MapBlocks(IReadOnlyDictionary<BasicBlockTag, BasicBlockTag> mapping)
    Parameters
    Type Name Description
    IReadOnlyDictionary<BasicBlockTag, BasicBlockTag> mapping

    A block-to-block mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapBlocks(Func<BasicBlockTag, BasicBlockTag>)

    Applies a mapping to all basic blocks referenced by branches in this block flow.

    Declaration
    public BlockFlow MapBlocks(Func<BasicBlockTag, BasicBlockTag> mapping)
    Parameters
    Type Name Description
    Func<BasicBlockTag, BasicBlockTag> mapping

    A block-to-block mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapBranches(Func<Branch, Branch>)

    Applies a mapping to all branches in this basic block.

    Declaration
    public BlockFlow MapBranches(Func<Branch, Branch> mapping)
    Parameters
    Type Name Description
    Func<Branch, Branch> mapping

    The mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapValues(IReadOnlyDictionary<ValueTag, ValueTag>)

    Applies a mapping to all values referenced by instructions and branches in this block flow.

    Declaration
    public BlockFlow MapValues(IReadOnlyDictionary<ValueTag, ValueTag> mapping)
    Parameters
    Type Name Description
    IReadOnlyDictionary<ValueTag, ValueTag> mapping

    A value-to-value mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    MapValues(Func<ValueTag, ValueTag>)

    Applies a mapping to all values referenced by instructions and branches in this block flow.

    Declaration
    public BlockFlow MapValues(Func<ValueTag, ValueTag> mapping)
    Parameters
    Type Name Description
    Func<ValueTag, ValueTag> mapping

    A value-to-value mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Edit this page View Source

    WithBranches(IReadOnlyList<Branch>)

    Replaces this flow's branches with a particular list of branches.

    Declaration
    public abstract BlockFlow WithBranches(IReadOnlyList<Branch> branches)
    Parameters
    Type Name Description
    IReadOnlyList<Branch> branches

    The new branches.

    Returns
    Type Description
    BlockFlow

    A new flow.

    | Edit this page View Source

    WithInstructions(IReadOnlyList<Instruction>)

    Replaces this flow's inner instructions.

    Declaration
    public abstract BlockFlow WithInstructions(IReadOnlyList<Instruction> instructions)
    Parameters
    Type Name Description
    IReadOnlyList<Instruction> instructions

    The new instructions.

    Returns
    Type Description
    BlockFlow

    A new flow.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX