Trying to run the better inliner so the graph matches up. Maybe instead figure out a way to passively ignored the static func calls. Regardless this assert fails due to a corrupted jump graph.
This commit is contained in:
@@ -37,7 +37,7 @@ public class Deob
|
||||
{
|
||||
public static void main(String[] args) throws IOException
|
||||
{
|
||||
merge(); if(true) return;
|
||||
//merge(); if(true) return;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -280,7 +280,9 @@ public class Instructions
|
||||
assert ins.jump.contains(oldi);
|
||||
|
||||
ins.jump.remove(oldi);
|
||||
|
||||
ins.jump.add(newi);
|
||||
newi.from.add(ins);
|
||||
|
||||
ins.replace(oldi, newi);
|
||||
}
|
||||
|
||||
@@ -265,7 +265,12 @@ public class MethodInliner implements Deobfuscator
|
||||
|
||||
// instead of return, jump to next instruction after the invoke
|
||||
Instruction oldI = i;
|
||||
|
||||
i = new Goto(methodInstructions, nextInstruction);
|
||||
|
||||
i.jump.add(nextInstruction);
|
||||
nextInstruction.from.add(i);
|
||||
|
||||
assert nextInstruction.getInstructions() == methodInstructions;
|
||||
assert methodInstructions.getInstructions().contains(nextInstruction);
|
||||
|
||||
@@ -287,16 +292,17 @@ public class MethodInliner implements Deobfuscator
|
||||
Instruction oldI = i;
|
||||
i = lvt.setVariableIndex(newIndex);
|
||||
|
||||
if (oldI != i)
|
||||
{
|
||||
for (Instruction i2 : insMap.values())
|
||||
i2.replace(oldI, i);
|
||||
|
||||
for (net.runelite.deob.attributes.code.Exception e : toExceptions.getExceptions())
|
||||
e.replace(oldI, i);
|
||||
|
||||
insMap.put(orig, i);
|
||||
}
|
||||
assert oldI == i;
|
||||
// if (oldI != i)
|
||||
// {
|
||||
// for (Instruction i2 : insMap.values())
|
||||
// i2.replace(oldI, i);
|
||||
//
|
||||
// for (net.runelite.deob.attributes.code.Exception e : toExceptions.getExceptions())
|
||||
// e.replace(oldI, i);
|
||||
//
|
||||
// insMap.put(orig, i);
|
||||
// }
|
||||
}
|
||||
|
||||
assert !methodInstructions.getInstructions().contains(i);
|
||||
|
||||
@@ -36,7 +36,10 @@ public class Rename
|
||||
|
||||
IsomorphismTester isoTest = new TypedVF2IsomorphismTester();
|
||||
if (!isoTest.areIsomorphic(g1, g2))
|
||||
{
|
||||
System.out.println("Not isomorphic " + g1.size() + " " + g2.size());
|
||||
return false;
|
||||
}
|
||||
|
||||
Map<Integer, Integer> mapping = isoTest.findIsomorphism(g1, g2);
|
||||
Map<Integer, Instruction> map1 = f1.getMethodCtx().getIdMap(), map2 = f2.getMethodCtx().getIdMap();
|
||||
@@ -93,7 +96,12 @@ public class Rename
|
||||
for (Frame fr1 : f1)
|
||||
for (Frame fr2 : f2)
|
||||
{
|
||||
compare(fr1, fr2);
|
||||
boolean b = compare(fr1, fr2);
|
||||
if (!b)
|
||||
{
|
||||
System.out.println("Mismatch " + p1.getMethod().getMethods().getClassFile().getName() + "." + p1.getMethod().getName() + " <-> " + p2.getMethod().getMethods().getClassFile().getName() + "." + p2.getMethod().getName());
|
||||
int i =7;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user