I need a better solution than having to edit the jumpgraph all the time
This commit is contained in:
@@ -79,14 +79,14 @@ public class Instructions
|
|||||||
|
|
||||||
public void remove(Instruction ins)
|
public void remove(Instruction ins)
|
||||||
{
|
{
|
||||||
for (Instruction i : instructions)
|
// for (Instruction i : instructions)
|
||||||
{
|
// {
|
||||||
if (i instanceof JumpingInstruction)
|
// if (i instanceof JumpingInstruction)
|
||||||
{
|
// {
|
||||||
JumpingInstruction j = (JumpingInstruction) i;
|
// JumpingInstruction j = (JumpingInstruction) i;
|
||||||
assert !j.getJumps().contains(ins);
|
// assert !j.getJumps().contains(ins);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
ins.remove();
|
ins.remove();
|
||||||
instructions.remove(ins);
|
instructions.remove(ins);
|
||||||
|
|||||||
@@ -203,8 +203,8 @@ public class MethodInliner implements Deobfuscator
|
|||||||
|
|
||||||
fromI.jump.remove(invokeIns);
|
fromI.jump.remove(invokeIns);
|
||||||
fromI.replace(invokeIns, firstParamStore);
|
fromI.replace(invokeIns, firstParamStore);
|
||||||
|
|
||||||
fromI.jump.add(firstParamStore);
|
fromI.jump.add(firstParamStore);
|
||||||
|
|
||||||
firstParamStore.from.add(fromI);
|
firstParamStore.from.add(fromI);
|
||||||
}
|
}
|
||||||
invokeIns.from.clear();
|
invokeIns.from.clear();
|
||||||
@@ -225,8 +225,14 @@ public class MethodInliner implements Deobfuscator
|
|||||||
// instead of return, jump to next instruction after the invoke
|
// instead of return, jump to next instruction after the invoke
|
||||||
Instruction oldI = i;
|
Instruction oldI = i;
|
||||||
i = new Goto(methodInstructions, nextInstruction);
|
i = new Goto(methodInstructions, nextInstruction);
|
||||||
|
assert methodInstructions.getInstructions().contains(nextInstruction);
|
||||||
|
|
||||||
i.jump.addAll(oldI.jump);
|
assert oldI != nextInstruction;
|
||||||
|
i.jump.add(nextInstruction);
|
||||||
|
nextInstruction.from.add(i);
|
||||||
|
|
||||||
|
assert oldI.jump.isEmpty();
|
||||||
|
//i.jump.addAll(oldI.jump);
|
||||||
i.from.addAll(oldI.from);
|
i.from.addAll(oldI.from);
|
||||||
|
|
||||||
for (Instruction i2 : oldI.from)
|
for (Instruction i2 : oldI.from)
|
||||||
@@ -249,7 +255,8 @@ public class MethodInliner implements Deobfuscator
|
|||||||
|
|
||||||
if (oldI != i)
|
if (oldI != i)
|
||||||
{
|
{
|
||||||
i.jump.addAll(oldI.jump);
|
assert oldI.jump.isEmpty();
|
||||||
|
//i.jump.addAll(oldI.jump);
|
||||||
i.from.addAll(oldI.from);
|
i.from.addAll(oldI.from);
|
||||||
|
|
||||||
for (Instruction i2 : oldI.from)
|
for (Instruction i2 : oldI.from)
|
||||||
|
|||||||
Reference in New Issue
Block a user