private void visitSwitchInsn(final Label dflt, final Label[] labels) { if (currentBasicBlock != null) { if (compute == COMPUTE_ALL_FRAMES) { currentBasicBlock.frame.execute(Opcodes.LOOKUPSWITCH, 0, null, null); // Add all the labels as successors of the current basic block. addSuccessorToCurrentBasicBlock(Edge.JUMP, dflt); dflt.getCanonicalInstance().flags |= Label.FLAG_JUMP_TARGET; for (Label label : labels) { addSuccessorToCurrentBasicBlock(Edge.JUMP, label); label.getCanonicalInstance().flags |= Label.FLAG_JUMP_TARGET; } } else if (compute == COMPUTE_MAX_STACK_AND_LOCAL) { // No need to update maxRelativeStackSize (the stack size delta is always negative). --relativeStackSize; // Add all the labels as successors of the current basic block. addSuccessorToCurrentBasicBlock(relativeStackSize, dflt); for (Label label : labels) { addSuccessorToCurrentBasicBlock(relativeStackSize, label); } } // End the current basic block. endCurrentBasicBlockWithNoSuccessor(); } }
addSuccessorToCurrentBasicBlock(Edge.JUMP, label); addSuccessorToCurrentBasicBlock(relativeStackSize, label);
addSuccessorToCurrentBasicBlock(Edge.JUMP, label); if (baseOpcode != Opcodes.GOTO) { addSuccessorToCurrentBasicBlock(relativeStackSize + 1, label); addSuccessorToCurrentBasicBlock(relativeStackSize, label);