Show / Hide Table of Contents

    Class BlockFlow

    Describes control flow at the end of a basic block.

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

    Properties

    | Improve this Doc View Source

    Branches

    Gets a list of branches this flow may take.

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

    A list of potential branches.

    | Improve this Doc View Source

    BranchTargets

    Gets a list of each branch's target.

    Declaration
    public IEnumerable<BasicBlockTag> BranchTargets { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<BasicBlockTag>

    A list of branch targets.

    | Improve this Doc View Source

    Instructions

    Gets a list of inner instructions for this block flow.

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

    The inner instructions.

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<ValueTag>

    A sequence of values.

    Methods

    | Improve this Doc View Source

    GetInstructionBuilder(BasicBlockBuilder, Int32)

    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.

    System.Int32 instructionIndex

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

    Returns
    Type Description
    InstructionBuilder

    An instruction builder for an anonymous instruction.

    | Improve this Doc 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
    System.Collections.Generic.IEnumerable<InstructionBuilder>

    A sequence of instruction builders for anonymous instructions.

    | Improve this Doc 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
    System.Collections.Generic.IReadOnlyDictionary<BranchArgument, BranchArgument> mapping

    A argument-to-argument mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Func<BranchArgument, BranchArgument> mapping

    A argument-to-argument mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Collections.Generic.IReadOnlyDictionary<BasicBlockTag, BasicBlockTag> mapping

    A block-to-block mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Func<BasicBlockTag, BasicBlockTag> mapping

    A block-to-block mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Func<Branch, Branch> mapping

    The mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Collections.Generic.IReadOnlyDictionary<ValueTag, ValueTag> mapping

    A value-to-value mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Func<ValueTag, ValueTag> mapping

    A value-to-value mapping to apply.

    Returns
    Type Description
    BlockFlow

    Block flow.

    | Improve this Doc 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
    System.Collections.Generic.IReadOnlyList<Branch> branches

    The new branches.

    Returns
    Type Description
    BlockFlow

    A new flow.

    | Improve this Doc View Source

    WithInstructions(IReadOnlyList<Instruction>)

    Replaces this flow's inner instructions.

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

    The new instructions.

    Returns
    Type Description
    BlockFlow

    A new flow.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX