Package com.strobel.decompiler.ast
Class LoopsAndConditions
java.lang.Object
com.strobel.decompiler.ast.LoopsAndConditions
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private final DecompilerContext
private final Map
<Label, ControlFlowNode> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ControlFlowGraph
buildGraph
(List<Node> nodes, Label entryLabel) private boolean
canBeSelfContainedLoop
(BasicBlock node, Expression branch, Label target) private int
countJumps
(Set<ControlFlowNode> nodes, Label target, Expression ignore) final void
findConditions
(Block block) findConditions
(Set<ControlFlowNode> scopeNodes, ControlFlowNode entryNode) private static Set
<ControlFlowNode> findDominatedNodes
(Set<ControlFlowNode> scope, ControlFlowNode head) private static Set
<ControlFlowNode> findLoopContents
(Set<ControlFlowNode> scope, ControlFlowNode head) private LoopsAndConditions.LoopExitInfo
findLoopExitInfo
(Set<ControlFlowNode> contents) final void
findLoops
(Set<ControlFlowNode> scopeNodes, ControlFlowNode entryPoint, boolean excludeEntryPoint) private static boolean
private void
reorderCaseBlocks
(Switch switchNode)
-
Field Details
-
labelsToNodes
-
context
-
_nextLabelIndex
private int _nextLabelIndex
-
-
Constructor Details
-
LoopsAndConditions
LoopsAndConditions(DecompilerContext context)
-
-
Method Details
-
findConditions
-
findLoops
-
buildGraph
-
canBeSelfContainedLoop
-
findLoops
private List<Node> findLoops(Set<ControlFlowNode> scopeNodes, ControlFlowNode entryPoint, boolean excludeEntryPoint) -
findLoopExitInfo
-
countJumps
-
findLoopContents
private static Set<ControlFlowNode> findLoopContents(Set<ControlFlowNode> scope, ControlFlowNode head) -
findConditions
-
reorderCaseBlocks
-
hasSingleEdgeEnteringBlock
-
findDominatedNodes
private static Set<ControlFlowNode> findDominatedNodes(Set<ControlFlowNode> scope, ControlFlowNode head)
-