optimized notConstant case, for methods that first get and then put a field

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@519 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 74ac101d57
commit 87098efef5
  1. 10
      jode/jode/obfuscator/ConstantAnalyzer.java

@ -926,7 +926,10 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer {
if (ci != null) { if (ci != null) {
FieldIdentifier fi = (FieldIdentifier) FieldIdentifier fi = (FieldIdentifier)
ci.getIdentifier(ref.getName(), ref.getType()); ci.getIdentifier(ref.getName(), ref.getType());
if (!fi.isNotConstant()) {
fi.setNotConstant(); fi.setNotConstant();
fieldNotConstant(fi);
}
} }
Type type = Type.tType(ref.getType()); Type type = Type.tType(ref.getType());
mergeInfo(instr.nextByAddr, info.pop(size + type.stackSize())); mergeInfo(instr.nextByAddr, info.pop(size + type.stackSize()));
@ -1068,12 +1071,7 @@ public class ConstantAnalyzer implements Opcodes, CodeAnalyzer {
// System.gc(); // System.gc();
} }
public void fieldNotConstant(IdentifierEvent ev) { public void fieldNotConstant(FieldIdentifier fi) {
if (!working) {
m.clazz.bundle.analyzeIdentifier(m);
return;
}
FieldIdentifier fi = (FieldIdentifier) ev.getSource();
for (Instruction instr = bytecode.getFirstInstr(); for (Instruction instr = bytecode.getFirstInstr();
instr != null; instr = instr.nextByAddr) { instr != null; instr = instr.nextByAddr) {
if (instr.opcode == opc_getfield if (instr.opcode == opc_getfield

Loading…
Cancel
Save