core: fix exception handler jumps (#320)
This commit is contained in:
@@ -418,8 +418,9 @@ public class BlockProcessor extends AbstractVisitor {
|
||||
boolean change = false;
|
||||
for (Edge edge : edges) {
|
||||
BlockNode target = edge.getTarget();
|
||||
if (!target.contains(AFlag.SYNTHETIC)) {
|
||||
BlockSplitter.insertBlockBetween(mth, edge.getSource(), target);
|
||||
BlockNode source = edge.getSource();
|
||||
if (!target.contains(AFlag.SYNTHETIC) && !source.contains(AFlag.SYNTHETIC)) {
|
||||
BlockSplitter.insertBlockBetween(mth, source, target);
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@ public class BlockSplitter extends AbstractVisitor {
|
||||
startNew = isSplitByJump(prevInsn, insn)
|
||||
|| SEPARATE_INSNS.contains(insn.getType())
|
||||
|| isDoWhile(blocksMap, curBlock, insn)
|
||||
|| insn.contains(AType.EXC_HANDLER)
|
||||
|| prevInsn.contains(AFlag.TRY_LEAVE)
|
||||
|| prevInsn.getType() == InsnType.MOVE_EXCEPTION;
|
||||
if (startNew) {
|
||||
|
||||
Reference in New Issue
Block a user