提交 2433a7e8 编写于 作者: S Skylot

core: fix exception handler jumps (#320)

上级 6e358d3e
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册