Instruction clone wasnt creating new jump lists...
This commit is contained in:
@@ -33,14 +33,21 @@ public abstract class Instruction implements Cloneable
|
||||
@Override
|
||||
public Instruction clone()
|
||||
{
|
||||
Instruction i;
|
||||
try
|
||||
{
|
||||
return (Instruction) super.clone();
|
||||
i = (Instruction) super.clone();
|
||||
}
|
||||
catch (CloneNotSupportedException ex)
|
||||
{
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
i.block = null;
|
||||
i.from = new ArrayList<>();
|
||||
i.jump = new ArrayList<>();
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
public void load(DataInputStream is) throws IOException
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class LookupSwitch extends Instruction implements JumpingInstruction
|
||||
{
|
||||
@@ -144,6 +145,6 @@ public class LookupSwitch extends Instruction implements JumpingInstruction
|
||||
for (Instruction i : branchi)
|
||||
list.add(i);
|
||||
list.add(defi);
|
||||
return list;
|
||||
return list.stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TableSwitch extends Instruction implements JumpingInstruction
|
||||
{
|
||||
@@ -140,6 +141,6 @@ public class TableSwitch extends Instruction implements JumpingInstruction
|
||||
for (Instruction i : branchi)
|
||||
list.add(i);
|
||||
list.add(defi);
|
||||
return list;
|
||||
return list.stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ public class MethodInliner implements Deobfuscator
|
||||
assert ins.getInstructions().get(invokeIdx).getInstructions() == ins;
|
||||
|
||||
int lvtIndex = code.getMaxLocals(),
|
||||
//startLvtIndex = lvtIndex,
|
||||
theirLocals = invokedMethod.getCode().getMaxLocals();
|
||||
|
||||
if (lvtIndex + theirLocals > 127)
|
||||
|
||||
Reference in New Issue
Block a user