Show / Hide Table of Contents

    Class TryFlow

    Control flow that executes an instruction and checks if that instruction throws. If it does, an exception-path branch is taken. Otherwise, a success-path branch is taken.

    Inheritance
    System.Object
    BlockFlow
    TryFlow
    Inherited Members
    BlockFlow.BranchTargets
    BlockFlow.Values
    BlockFlow.GetInstructionBuilders(BasicBlockBuilder)
    BlockFlow.MapValues(Func<ValueTag, ValueTag>)
    BlockFlow.MapValues(IReadOnlyDictionary<ValueTag, ValueTag>)
    BlockFlow.MapBlocks(Func<BasicBlockTag, BasicBlockTag>)
    BlockFlow.MapBlocks(IReadOnlyDictionary<BasicBlockTag, BasicBlockTag>)
    BlockFlow.MapBranches(Func<Branch, Branch>)
    BlockFlow.MapArguments(Func<BranchArgument, BranchArgument>)
    BlockFlow.MapArguments(IReadOnlyDictionary<BranchArgument, BranchArgument>)
    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.Flow
    Assembly: Flame.Compiler.dll
    Syntax
    public sealed class TryFlow : BlockFlow

    Constructors

    | Improve this Doc View Source

    TryFlow(Instruction, Branch, Branch)

    Creates 'try' flow from an instruction, a branch to take if that instruction does not throw and a branch to take if the instruction does throw.

    Declaration
    public TryFlow(Instruction instruction, Branch successBranch, Branch exceptionBranch)
    Parameters
    Type Name Description
    Instruction instruction

    The inner instruction to execute.

    Branch successBranch

    The branch to take if the instruction does not throw.

    Branch exceptionBranch

    The branch to take if the instruction throws.

    Properties

    | Improve this Doc View Source

    Branches

    Gets a list of branches this flow may take.

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

    A list of potential branches.

    Overrides
    BlockFlow.Branches
    | Improve this Doc View Source

    ExceptionBranch

    Gets the branch this 'try' flow takes if the instruction throws.

    Declaration
    public Branch ExceptionBranch { get; }
    Property Value
    Type Description
    Branch

    The exception branch.

    | Improve this Doc View Source

    Instruction

    Gets the instruction this 'try' flow tries to execute.

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

    The inner instruction.

    | Improve this Doc View Source

    Instructions

    Gets a list of inner instructions for this block flow.

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

    The inner instructions.

    Overrides
    BlockFlow.Instructions
    | Improve this Doc View Source

    SuccessBranch

    Gets the branch this 'try' flow takes if the instruction does not throw.

    Declaration
    public Branch SuccessBranch { get; }
    Property Value
    Type Description
    Branch

    The success branch.

    Methods

    | Improve this Doc View Source

    GetInstructionBuilder(BasicBlockBuilder, Int32)

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

    Declaration
    public override 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.

    Overrides
    BlockFlow.GetInstructionBuilder(BasicBlockBuilder, Int32)
    | Improve this Doc View Source

    WithBranches(IReadOnlyList<Branch>)

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

    Declaration
    public override 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.

    Overrides
    BlockFlow.WithBranches(IReadOnlyList<Branch>)
    | Improve this Doc View Source

    WithInstructions(IReadOnlyList<Instruction>)

    Replaces this flow's inner instructions.

    Declaration
    public override 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.

    Overrides
    BlockFlow.WithInstructions(IReadOnlyList<Instruction>)
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX