Class ExceptionHandlerMapper
java.lang.Object
com.strobel.assembler.metadata.ExceptionHandlerMapper
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ControlFlowNodeprivate final ControlFlowNodeprivate final List<ExceptionHandler> private final boolean[]private final InstructionCollectionprivate intprivate final List<ControlFlowNode> private final int[]private final ControlFlowNodeprivate final List<ExceptionTableEntry> (package private) boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateExceptionHandlerMapper(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries) -
Method Summary
Modifier and TypeMethodDescriptionprivate ControlFlowGraphbuild()private voidprivate ControlFlowEdgecreateEdge(ControlFlowNode fromNode, ControlFlowNode toNode, JumpType type) private ControlFlowEdgecreateEdge(ControlFlowNode fromNode, Instruction toInstruction, JumpType type) private voidprivate List<ExceptionHandler> private voidprivate voidprivate static Set<ControlFlowNode> findDominatedNodes(ControlFlowGraph cfg, ControlFlowNode head) private ExceptionHandlerfindInnermostExceptionHandler(int offsetInTryBlock) private static ControlFlowNodefindInnermostExceptionHandlerNode(ControlFlowGraph cfg, int offsetInTryBlock) private ControlFlowNodefindNode(Instruction instruction) private ControlFlowNodeprivate intgetInstructionIndex(Instruction instruction) private booleanisHandlerStart(Instruction instruction) private static booleanisNarrower(ExceptionHandler handler, ExceptionHandler anchor) static List<ExceptionHandler> run(InstructionCollection instructions, List<ExceptionTableEntry> tableEntries) private static booleanshouldIncludeExceptionalExit(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
-