Working on all tests again, hitting more ifconds not lining up

This commit is contained in:
Adam
2016-02-05 15:54:33 -05:00
parent 54b83ebda5
commit e2afbd3b98
3 changed files with 12 additions and 8 deletions

View File

@@ -19,7 +19,7 @@ public class IfACmpNe extends If
if (super.isSame(thisIc, otherIc)) if (super.isSame(thisIc, otherIc))
return true; return true;
if (otherIc.getInstruction() instanceof IfNonNull) if (otherIc.getInstruction() instanceof IfNonNull || otherIc.getInstruction() instanceof IfNull)
{ {
StackContext s1 = thisIc.getPops().get(0), StackContext s1 = thisIc.getPops().get(0),
s2 = thisIc.getPops().get(1); s2 = thisIc.getPops().get(1);
@@ -44,7 +44,7 @@ public class IfACmpNe extends If
@Override @Override
public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other) public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other)
{ {
if (other.getInstruction() instanceof IfACmpEq) if (other.getInstruction() instanceof IfACmpEq || other.getInstruction() instanceof IfNull)
{ {
super.mapOtherBranch(mapping, ctx, other); super.mapOtherBranch(mapping, ctx, other);
} }

View File

@@ -38,8 +38,6 @@ public class ParallellMappingExecutor
if (e.frames.isEmpty()) if (e.frames.isEmpty())
return false; return false;
assert !e2.frames.isEmpty();
Frame f1 = e.frames.get(0), Frame f1 = e.frames.get(0),
f2 = f1.other; f2 = f1.other;

View File

@@ -85,16 +85,22 @@ public class MapStaticTest
ClassGroup group1 = JarUtil.loadJar(new File(JAR1)); ClassGroup group1 = JarUtil.loadJar(new File(JAR1));
ClassGroup group2 = JarUtil.loadJar(new File(JAR2)); ClassGroup group2 = JarUtil.loadJar(new File(JAR2));
Method m1 = group1.findClass("client").findMethod("vmethod3096"); Method m1 = group1.findClass("client").findMethod("vmethod3054");
Method m2 = group2.findClass("client").findMethod("vmethod2975"); Method m2 = group2.findClass("client").findMethod("vmethod2973");
ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2); ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2);
System.out.println("BEGIN OF MAPPING"); System.out.println("BEGIN OF MAPPING");
for (Entry<Object, Object> e : mappings.getMap().entrySet()) for (Object o : mappings.getOrder())
{ {
System.out.println(e.getKey() + " <-> " + e.getValue()); Object value = mappings.get(o);
System.out.println(o + " <-> " + value);
} }
System.out.println("END OF MAPPINGS " + mappings.getMap().size());
// I think because this is an array store
//Object other = mappings.get(group1.findClass("class136").findField("field2098"));
//Assert.assertNotNull(other);
} }
private static boolean test; private static boolean test;