Package com.strobel.assembler.metadata
Class ExceptionHandlerMapper
java.lang.Object
com.strobel.assembler.metadata.ExceptionHandlerMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ControlFlowNode
private final ControlFlowNode
private final List
<ExceptionHandler> private final boolean[]
private final InstructionCollection
private int
private final List
<ControlFlowNode> private final int[]
private final ControlFlowNode
private final List
<ExceptionTableEntry> (package private) boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ExceptionHandlerMapper
(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries) -
Method Summary
Modifier and TypeMethodDescriptionprivate ControlFlowGraph
build()
private void
private ControlFlowEdge
createEdge
(ControlFlowNode fromNode, ControlFlowNode toNode, JumpType type) private ControlFlowEdge
createEdge
(ControlFlowNode fromNode, Instruction toInstruction, JumpType type) private void
private List
<ExceptionHandler> private void
private void
private static Set
<ControlFlowNode> findDominatedNodes
(ControlFlowGraph cfg, ControlFlowNode head) private ExceptionHandler
findInnermostExceptionHandler
(int offsetInTryBlock) private static ControlFlowNode
findInnermostExceptionHandlerNode
(ControlFlowGraph cfg, int offsetInTryBlock) private ControlFlowNode
findNode
(Instruction instruction) private ControlFlowNode
private int
getInstructionIndex
(Instruction instruction) private boolean
isHandlerStart
(Instruction instruction) private static boolean
isNarrower
(ExceptionHandler handler, ExceptionHandler anchor) static List
<ExceptionHandler> run
(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries) private static boolean
shouldIncludeExceptionalExit
(ControlFlowGraph cfg, ControlFlowNode head, ControlFlowNode node)
-
Field Details
-
_instructions
-
_tableEntries
-
_handlerPlaceholders
-
_nodes
-
_offsets
private final int[] _offsets -
_hasIncomingJumps
private final boolean[] _hasIncomingJumps -
_entryPoint
-
_regularExit
-
_exceptionalExit
-
_nextBlockId
private int _nextBlockId -
copyFinallyBlocks
boolean copyFinallyBlocks
-
-
Constructor Details
-
ExceptionHandlerMapper
private ExceptionHandlerMapper(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries)
-
-
Method Details
-
run
public static List<ExceptionHandler> run(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries) -
findNode
-
findDominatedNodes
-
shouldIncludeExceptionalExit
private static boolean shouldIncludeExceptionalExit(ControlFlowGraph cfg, ControlFlowNode head, ControlFlowNode node) -
build
-
isHandlerStart
-
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
-
findInnermostExceptionHandler
-
findParentExceptionHandlerNode
-
getInstructionIndex
-
createEdge
private ControlFlowEdge createEdge(ControlFlowNode fromNode, Instruction toInstruction, JumpType type) -
createEdge
-
createHandlerPlaceholders
-