Class ExceptionHandlerRegion<TInstruction>
- Namespace
- Echo.ControlFlow.Regions
- Assembly
- Echo.ControlFlow.dll
Represents a region in a control flow graph that is protected by an exception handler block.
public class ExceptionHandlerRegion<TInstruction> : ControlFlowRegion<TInstruction>, IControlFlowRegion<TInstruction>, ISubGraph where TInstruction : notnull
Type Parameters
TInstructionThe type of data that each node in the graph stores.
- Inheritance
-
ControlFlowRegion<TInstruction>ExceptionHandlerRegion<TInstruction>
- Implements
-
IControlFlowRegion<TInstruction>
- Inherited Members
- Extension Methods
Constructors
ExceptionHandlerRegion()
Creates a new instance of the ExceptionHandlerRegion<TInstruction> class.
public ExceptionHandlerRegion()
Properties
Handlers
Gets the regions that form the handler blocks.
public RegionCollection<TInstruction, HandlerRegion<TInstruction>> Handlers { get; }
Property Value
- RegionCollection<TInstruction, HandlerRegion<TInstruction>>
ProtectedRegion
Gets the region of nodes that is protected by the exception handler.
public ScopeRegion<TInstruction> ProtectedRegion { get; }
Property Value
- ScopeRegion<TInstruction>
Methods
GetEntryPoint()
Obtains the first node that is executed in the region (if available).
public override ControlFlowNode<TInstruction>? GetEntryPoint()
Returns
- ControlFlowNode<TInstruction>
The node, or
nullif no entrypoint was specified.
GetNodes()
Gets a collection of all nodes in the control flow graph region. This includes all nodes in the nested regions.
public override IEnumerable<ControlFlowNode<TInstruction>> GetNodes()
Returns
- IEnumerable<ControlFlowNode<TInstruction>>
The nodes.
GetSubRegions()
Gets a collection of all nested regions defined in this region.
public override IEnumerable<ControlFlowRegion<TInstruction>> GetSubRegions()
Returns
- IEnumerable<ControlFlowRegion<TInstruction>>
The subregions.
RemoveNode(ControlFlowNode<TInstruction>)
Removes the node from the region.
public override bool RemoveNode(ControlFlowNode<TInstruction> node)
Parameters
nodeControlFlowNode<TInstruction>The node to remove.
Returns
- bool
trueif the node was found and removed,falseotherwise.