Another method
This commit is contained in:
@@ -2,6 +2,8 @@ package net.runelite.deob.attributes.code.instructions;
|
||||
|
||||
import net.runelite.deob.attributes.code.InstructionType;
|
||||
import net.runelite.deob.attributes.code.Instructions;
|
||||
import net.runelite.deob.execution.InstructionContext;
|
||||
import net.runelite.deob.execution.StackContext;
|
||||
|
||||
public class IfACmpEq extends If
|
||||
{
|
||||
@@ -9,4 +11,28 @@ public class IfACmpEq extends If
|
||||
{
|
||||
super(instructions, type, pc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSame(InstructionContext thisIc, InstructionContext otherIc)
|
||||
{
|
||||
if (super.isSame(thisIc, otherIc))
|
||||
return true;
|
||||
|
||||
if (otherIc.getInstruction() instanceof IfNull)
|
||||
{
|
||||
StackContext s1 = thisIc.getPops().get(0),
|
||||
s2 = thisIc.getPops().get(1);
|
||||
|
||||
if (s1.getPushed().getInstruction() instanceof AConstNull)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (s2.getPushed().getInstruction() instanceof AConstNull)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ public class MapStaticTest
|
||||
{ "client.vmethod3054", "client.vmethod2973" },
|
||||
{ "class99.method2220", "class99.method2149" },
|
||||
{ "class146.vmethod3158", "class146.vmethod3070" },
|
||||
{ "class166.method3315", "class166.method3254" },
|
||||
};
|
||||
|
||||
//@Test
|
||||
@@ -31,8 +32,8 @@ public class MapStaticTest
|
||||
//@Test
|
||||
public void testAll() throws IOException
|
||||
{
|
||||
ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
|
||||
ClassGroup group2 = JarUtil.loadJar(new File("d:/rs/07/adamin2.jar"));
|
||||
ClassGroup group1 = JarUtil.loadJar(new File("c:/rs/adamin1.jar"));
|
||||
ClassGroup group2 = JarUtil.loadJar(new File("c:/rs/adamin2.jar"));
|
||||
|
||||
for (String[] s : methods)
|
||||
{
|
||||
@@ -48,11 +49,11 @@ public class MapStaticTest
|
||||
@Test
|
||||
public void test() throws IOException
|
||||
{
|
||||
ClassGroup group1 = JarUtil.loadJar(new File("d:/rs/07/adamin1.jar"));
|
||||
ClassGroup group2 = JarUtil.loadJar(new File("d:/rs/07/adamin2.jar"));
|
||||
ClassGroup group1 = JarUtil.loadJar(new File("c:/rs/adamin1.jar"));
|
||||
ClassGroup group2 = JarUtil.loadJar(new File("c:/rs/adamin2.jar"));
|
||||
|
||||
Method m1 = group1.findClass("class146").findMethod("vmethod3158");
|
||||
Method m2 = group2.findClass("class146").findMethod("vmethod3070");
|
||||
Method m1 = group1.findClass("class166").findMethod("method3315");
|
||||
Method m2 = group2.findClass("class166").findMethod("method3254");
|
||||
|
||||
ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user