From d34b1e7e72d96ab483c8a2d2b38365c96f46133a Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 30 Aug 2019 20:25:52 +0100 Subject: [PATCH] Combine analyze and getFrames --- .../java/dev/openrs2/deob/transform/DummyArgTransformer.java | 4 +--- .../java/dev/openrs2/deob/transform/UnusedArgTransformer.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java index a969bd669b..d93cd4ffa2 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/DummyArgTransformer.java @@ -157,9 +157,7 @@ public final class DummyArgTransformer extends Transformer { var parameters = constArgs.get(parentMethod); var analyzer = new Analyzer<>(new IntInterpreter(parameters)); - analyzer.analyze(clazz.name, method); - - var frames = analyzer.getFrames(); + var frames = analyzer.analyze(clazz.name, method); var changed = false; diff --git a/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java b/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java index d116080a44..b7d37b4ed0 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java +++ b/deob/src/main/java/dev/openrs2/deob/transform/UnusedArgTransformer.java @@ -125,9 +125,7 @@ public final class UnusedArgTransformer extends Transformer { /* delete unused int args from call sites */ if ((method.access & (Opcodes.ACC_ABSTRACT | Opcodes.ACC_NATIVE)) == 0) { var analyzer = new Analyzer<>(new ConstSourceInterpreter()); - analyzer.analyze(clazz.name, method); - - var frames = analyzer.getFrames(); + var frames = analyzer.analyze(clazz.name, method); var deadInsns = new ArrayList(); for (var i = 0; i < frames.length; i++) {