Combine analyze and getFrames

bzip2
Graham 5 years ago
parent 28369f1d75
commit d34b1e7e72
  1. 4
      deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java
  2. 4
      deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java

@ -157,9 +157,7 @@ public final class DummyArgTransformer extends Transformer {
var parameters = constArgs.get(parentMethod); var parameters = constArgs.get(parentMethod);
var analyzer = new Analyzer<>(new IntInterpreter(parameters)); var analyzer = new Analyzer<>(new IntInterpreter(parameters));
analyzer.analyze(clazz.name, method); var frames = analyzer.analyze(clazz.name, method);
var frames = analyzer.getFrames();
var changed = false; var changed = false;

@ -125,9 +125,7 @@ public final class UnusedArgTransformer extends Transformer {
/* delete unused int args from call sites */ /* delete unused int args from call sites */
if ((method.access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE)) == 0) { if ((method.access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE)) == 0) {
var analyzer = new Analyzer<>(new ConstSourceInterpreter()); var analyzer = new Analyzer<>(new ConstSourceInterpreter());
analyzer.analyze(clazz.name, method); var frames = analyzer.analyze(clazz.name, method);
var frames = analyzer.getFrames();
var deadInsns = new ArrayList<AbstractInsnNode>(); var deadInsns = new ArrayList<AbstractInsnNode>();
for (var i = 0; i < frames.length; i++) { for (var i = 0; i < frames.length; i++) {

Loading…
Cancel
Save