From 60e617facdaa93f2b55b0d370be4ad95deba34c0 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 5 Jul 1999 14:27:48 +0000 Subject: [PATCH] Don't allow instructions to merge over the end boundary of a try block git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1000 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/decompiler/MethodAnalyzer.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jode/jode/decompiler/MethodAnalyzer.java b/jode/jode/decompiler/MethodAnalyzer.java index 424e3f5..7ed8d68 100644 --- a/jode/jode/decompiler/MethodAnalyzer.java +++ b/jode/jode/decompiler/MethodAnalyzer.java @@ -249,6 +249,13 @@ public class MethodAnalyzer implements Analyzer, Scope, ClassDeclarer { for (int i=0; i < handlers.length; i++) { Instruction instr = handlers[i].start; + if (instr.tmpInfo == null) + instr.tmpInfo + = new FlowBlock(this, instr.addr, instr.length); + /* end doesn't have a predecessor, but we must prevent + * it from being merged with the previous instructions. + */ + instr = handlers[i].end.nextByAddr; if (instr.tmpInfo == null) instr.tmpInfo = new FlowBlock(this, instr.addr, instr.length); @@ -285,7 +292,6 @@ public class MethodAnalyzer implements Analyzer, Scope, ClassDeclarer { && !instr.alwaysJumps && instr.succs == null) { lastBlock.doSequentialT2(block, instr.length); - } else { if (instr.tmpInfo == null)