Class JumpFlow
Control flow that unconditionally jumps to a particular branch.
Inherited Members
Namespace: Flame.Compiler.Flow
Assembly: Flame.Compiler.dll
Syntax
public sealed class JumpFlow : BlockFlow
Constructors
| Improve this Doc View SourceJumpFlow(BasicBlockTag)
Creates control flow that unconditionally jumps to a particular block, passing no arguments.
Declaration
public JumpFlow(BasicBlockTag target)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | target | The target block. |
JumpFlow(BasicBlockTag, IReadOnlyList<BranchArgument>)
Creates control flow that unconditionally jumps to a particular block, passing a list of arguments.
Declaration
public JumpFlow(BasicBlockTag target, IReadOnlyList<BranchArgument> arguments)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | target | The target block. |
System.Collections.Generic.IReadOnlyList<BranchArgument> | arguments | A list of arguments to pass to the target block. |
JumpFlow(BasicBlockTag, IReadOnlyList<ValueTag>)
Creates control flow that unconditionally jumps to a particular block, passing a list of arguments.
Declaration
public JumpFlow(BasicBlockTag target, IReadOnlyList<ValueTag> arguments)
Parameters
Type | Name | Description |
---|---|---|
BasicBlockTag | target | The target block. |
System.Collections.Generic.IReadOnlyList<ValueTag> | arguments | A list of arguments to pass to the target block. |
JumpFlow(Branch)
Creates control flow that unconditionally jumps to a particular branch.
Declaration
public JumpFlow(Branch branch)
Parameters
Type | Name | Description |
---|---|---|
Branch | branch | The branch to jump to. |
Properties
| Improve this Doc View SourceBranch
Gets the branch that is unconditionally taken by this flow.
Declaration
public Branch Branch { get; }
Property Value
Type | Description |
---|---|
Branch | The jump branch. |
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
| Improve this Doc View SourceInstructions
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
Methods
| Improve this Doc View SourceGetInstructionBuilder(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
| Improve this Doc View SourceWithBranches(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
| Improve this Doc View SourceWithInstructions(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. |