codetransformer interface

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1018 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 59d6432c77
commit d681401ddf
  1. 25
      jode/jode/obfuscator/RemovePopAnalyzer.java

@ -24,21 +24,8 @@ import jode.GlobalOptions;
import jode.type.MethodType; import jode.type.MethodType;
import jode.type.Type; import jode.type.Type;
public class RemovePopAnalyzer implements CodeAnalyzer, Opcodes { public class RemovePopAnalyzer implements CodeTransformer, Opcodes {
MethodIdentifier m; public RemovePopAnalyzer() {
BytecodeInfo bytecode;
public RemovePopAnalyzer(BytecodeInfo bytecode, MethodIdentifier m) {
this.m = m;
this.bytecode = bytecode;
}
/**
* Reads the opcodes out of the code info and determine its
* references
* @return an enumeration of the references.
*/
public void analyzeCode() {
} }
class PopInfo { class PopInfo {
@ -60,8 +47,7 @@ public class RemovePopAnalyzer implements CodeAnalyzer, Opcodes {
return popInstr; return popInstr;
} }
public BytecodeInfo stripCode() { public void transformCode(BytecodeInfo bytecode) {
try {
int poppush[] = new int[2]; int poppush[] = new int[2];
Instruction instr = bytecode.getFirstInstr(); Instruction instr = bytecode.getFirstInstr();
while (instr != null) { while (instr != null) {
@ -281,10 +267,5 @@ public class RemovePopAnalyzer implements CodeAnalyzer, Opcodes {
continue; continue;
} }
} }
} catch (RuntimeException ex) {
ex.printStackTrace(GlobalOptions.err);
bytecode.dumpCode(GlobalOptions.err);
}
return bytecode;
} }
} }

Loading…
Cancel
Save