Remove all-null parameter arrays from the constArgs map

bzip2
Graham 5 years ago
parent 1cec2c3739
commit 95c4741229
  1. 12
      deob/src/main/java/dev/openrs2/deob/transform/DummyTransformer.java

@ -298,14 +298,24 @@ public final class DummyTransformer extends Transformer {
for (var method : inheritedMethodSets) {
var args = (Type.getArgumentsAndReturnSizes(method.iterator().next().getDesc()) >> 2) - 1;
var allUnknown = true;
@SuppressWarnings("unchecked")
var parameters = (ImmutableSet<Integer>[]) new ImmutableSet<?>[args];
for (int i = 0; i < args; i++) {
parameters[i] = union(argValues.get(new ArgRef(method, i)));
var parameter = union(argValues.get(new ArgRef(method, i)));
if (parameter != null) {
allUnknown = false;
}
parameters[i] = parameter;
}
if (allUnknown) {
constArgs.remove(method);
} else {
constArgs.put(method, parameters);
}
}
}
@Override
protected void postTransform(ClassPath classPath) {

Loading…
Cancel
Save