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

Loading…
Cancel
Save