Interface CAstControlFlowMap
- All Known Implementing Classes:
CAstControlFlowRecorder
public interface CAstControlFlowMap
The control flow information for the CAPA AST of a particular entity. An ast may contain various
nodes that pertain to control flow---such as gotos, branches, exceptions and so on---and this map
denotes the target ast nodes of ast nodes that are control flow instructions. The label is fairly
arbitrary---it will depend on the language, producers and consumers of the tree---but is
generally expected to be things like case labels, exception types, conditional outcomes and so
on.
- Author:
- Julian Dolby (dolby@us.ibm.com)
-
Field Summary
Modifier and TypeFieldDescriptionstatic final CAstNode
A distinguished target that means this control flow is the target of an uncaught exception.static final Object
A distinguished label that means this control flow is the default target of a switch (or case) statement as found in many procedural languages. -
Method Summary
Modifier and TypeMethodDescriptionReturns an iterator of all CAstNodes for which this map contains control flow mapping information.Return a collection of control-flow ast nodes that have this one as a possible target.Return the target ast node of the control-flow instruction denoted by from with respect to the given label.getTargetLabels
(CAstNode from) Return a collection of all labels for which the control-flow ast nodefrom
has a target.
-
Field Details
-
SWITCH_DEFAULT
A distinguished label that means this control flow is the default target of a switch (or case) statement as found in many procedural languages. -
EXCEPTION_TO_EXIT
A distinguished target that means this control flow is the target of an uncaught exception.
-
-
Method Details
-
getTarget
-
getTargetLabels
Return a collection of all labels for which the control-flow ast nodefrom
has a target. -
getSourceNodes
Return a collection of control-flow ast nodes that have this one as a possible target. -
getMappedNodes
Collection<CAstNode> getMappedNodes()Returns an iterator of all CAstNodes for which this map contains control flow mapping information.
-