a minor optimization

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1139 379699f6-c40d-0410-875b-85095c16579e
branch_1_1
jochen 26 years ago
parent 4e007feb53
commit 3ee902a629
  1. 7
      jode/jode/obfuscator/LocalOptimizer.java.in

@ -432,7 +432,9 @@ public class LocalOptimizer implements Opcodes, CodeTransformer {
Instruction prevInstr = instr.getPrevByAddr(); Instruction prevInstr = instr.getPrevByAddr();
if (prevInstr != null) { if (prevInstr != null) {
if (prevInstr.getOpcode() == opc_jsr) { if (!prevInstr.doesAlwaysJump())
promoteReads(info, prevInstr);
else if (prevInstr.getOpcode() == opc_jsr) {
/* Prev instr is a jsr, promote reads to the /* Prev instr is a jsr, promote reads to the
* corresponding ret. * corresponding ret.
*/ */
@ -448,8 +450,7 @@ public class LocalOptimizer implements Opcodes, CodeTransformer {
promoteReads(info, prevInstr, promoteReads(info, prevInstr,
jsrInfo.retInfo.usedBySub, true); jsrInfo.retInfo.usedBySub, true);
} }
} else if (!prevInstr.doesAlwaysJump()) }
promoteReads(info, prevInstr);
} }
if (instr.getPreds() != null) { if (instr.getPreds() != null) {

Loading…
Cancel
Save