Package com.strobel.assembler.metadata
Class ExceptionHandlerMapper
- java.lang.Object
-
- com.strobel.assembler.metadata.ExceptionHandlerMapper
-
public final class ExceptionHandlerMapper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ControlFlowNode
_entryPoint
private ControlFlowNode
_exceptionalExit
private java.util.List<ExceptionHandler>
_handlerPlaceholders
private boolean[]
_hasIncomingJumps
private InstructionCollection
_instructions
private int
_nextBlockId
private java.util.List<ControlFlowNode>
_nodes
private int[]
_offsets
private ControlFlowNode
_regularExit
private java.util.List<ExceptionTableEntry>
_tableEntries
(package private) boolean
copyFinallyBlocks
-
Constructor Summary
Constructors Modifier Constructor Description private
ExceptionHandlerMapper(InstructionCollection instructions, java.util.List<ExceptionTableEntry> tableEntries)
-
Method Summary
-
-
-
Field Detail
-
_instructions
private final InstructionCollection _instructions
-
_tableEntries
private final java.util.List<ExceptionTableEntry> _tableEntries
-
_handlerPlaceholders
private final java.util.List<ExceptionHandler> _handlerPlaceholders
-
_nodes
private final java.util.List<ControlFlowNode> _nodes
-
_offsets
private final int[] _offsets
-
_hasIncomingJumps
private final boolean[] _hasIncomingJumps
-
_entryPoint
private final ControlFlowNode _entryPoint
-
_regularExit
private final ControlFlowNode _regularExit
-
_exceptionalExit
private final ControlFlowNode _exceptionalExit
-
_nextBlockId
private int _nextBlockId
-
copyFinallyBlocks
boolean copyFinallyBlocks
-
-
Constructor Detail
-
ExceptionHandlerMapper
private ExceptionHandlerMapper(InstructionCollection instructions, java.util.List<ExceptionTableEntry> tableEntries)
-
-
Method Detail
-
run
public static java.util.List<ExceptionHandler> run(InstructionCollection instructions, java.util.List<ExceptionTableEntry> tableEntries)
-
findNode
private ControlFlowNode findNode(Instruction instruction)
-
findDominatedNodes
private static java.util.Set<ControlFlowNode> findDominatedNodes(ControlFlowGraph cfg, ControlFlowNode head)
-
shouldIncludeExceptionalExit
private static boolean shouldIncludeExceptionalExit(ControlFlowGraph cfg, ControlFlowNode head, ControlFlowNode node)
-
build
private ControlFlowGraph build()
-
isHandlerStart
private boolean isHandlerStart(Instruction instruction)
-
calculateIncomingJumps
private void calculateIncomingJumps()
-
createNodes
private void createNodes()
-
createRegularControlFlow
private void createRegularControlFlow()
-
createExceptionalControlFlow
private void createExceptionalControlFlow()
-
findInnermostExceptionHandlerNode
private static ControlFlowNode findInnermostExceptionHandlerNode(ControlFlowGraph cfg, int offsetInTryBlock)
-
isNarrower
private static boolean isNarrower(ExceptionHandler handler, ExceptionHandler anchor)
-
findInnermostExceptionHandler
private ExceptionHandler findInnermostExceptionHandler(int offsetInTryBlock)
-
findParentExceptionHandlerNode
private ControlFlowNode findParentExceptionHandlerNode(ControlFlowNode node)
-
getInstructionIndex
private int getInstructionIndex(Instruction instruction)
-
createEdge
private ControlFlowEdge createEdge(ControlFlowNode fromNode, Instruction toInstruction, JumpType type)
-
createEdge
private ControlFlowEdge createEdge(ControlFlowNode fromNode, ControlFlowNode toNode, JumpType type)
-
createHandlerPlaceholders
private java.util.List<ExceptionHandler> createHandlerPlaceholders()
-
-