* jode/flow/CatchBlock.java.in (combineLocal): Added more checks

if LocalStoreOperator is of the right form.


git-svn-id: https://svn.code.sf.net/p/jode/code/branches/branch_1_1@1326 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
hoenicke 23 years ago
parent a65fd35ceb
commit aca789beed
  1. 5
      jode/ChangeLog
  2. 13
      jode/jode/flow/CatchBlock.java.in

@ -1,3 +1,8 @@
2001-07-11 Jochen Hoenicke <jochen@gnu.org>
* jode/flow/CatchBlock.java.in (combineLocal): Added more checks
if LocalStoreOperator is of the right form.
2001-07-10 Jochen Hoenicke <jochen@gnu.org> 2001-07-10 Jochen Hoenicke <jochen@gnu.org>
* jode/obfuscator/modules/SimpleAnalyzer.java.in: * jode/obfuscator/modules/SimpleAnalyzer.java.in:

@ -24,6 +24,7 @@ import jode.decompiler.Declarable;
import jode.expr.Expression; import jode.expr.Expression;
import jode.expr.LocalLoadOperator; import jode.expr.LocalLoadOperator;
import jode.expr.LocalStoreOperator; import jode.expr.LocalStoreOperator;
import jode.expr.NopOperator;
import jode.expr.StoreInstruction; import jode.expr.StoreInstruction;
import jode.util.SimpleSet; import jode.util.SimpleSet;
@ -218,18 +219,20 @@ public class CatchBlock extends StructuredBlock {
} else if (firstInstr instanceof InstructionBlock) { } else if (firstInstr instanceof InstructionBlock) {
Expression instr = Expression instr =
((InstructionBlock) firstInstr).getInstruction(); ((InstructionBlock) firstInstr).getInstruction();
if (instr instanceof StoreInstruction if (instr instanceof StoreInstruction) {
&& (((StoreInstruction)instr).getLValue() StoreInstruction store = (StoreInstruction) instr;
instanceof LocalStoreOperator)) { if (store.getOperatorIndex() == store.OPASSIGN_OP
&& store.getSubExpressions()[1] instanceof NopOperator
&& store.getLValue() instanceof LocalStoreOperator) {
/* The exception is stored in a local variable */ /* The exception is stored in a local variable */
exceptionLocal = ((LocalStoreOperator) exceptionLocal = ((LocalStoreOperator) store.getLValue())
((StoreInstruction)instr).getLValue())
.getLocalInfo(); .getLocalInfo();
exceptionLocal.setType(exceptionType); exceptionLocal.setType(exceptionType);
firstInstr.removeBlock(); firstInstr.removeBlock();
return true; return true;
} }
} }
}
return false; return false;
} }
} }

Loading…
Cancel
Save