ifacmpeq vs ifnonnull, ifeq vs ificmpne

This commit is contained in:
Adam
2016-01-30 13:56:58 -05:00
parent 234e42a319
commit 2b4c47fb25
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ public class IfACmpEq extends If
if (super.isSame(thisIc, otherIc)) if (super.isSame(thisIc, otherIc))
return true; return true;
if (otherIc.getInstruction() instanceof IfNull) if (otherIc.getInstruction() instanceof IfNull || otherIc.getInstruction() instanceof IfNonNull)
{ {
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 IfACmpEq 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 IfACmpNe) if (other.getInstruction() instanceof IfACmpNe || other.getInstruction() instanceof IfNonNull)
{ {
super.mapOtherBranch(mapping, ctx, other); super.mapOtherBranch(mapping, ctx, other);
} }

View File

@@ -24,7 +24,7 @@ public class IfEq extends If0
{ {
return true; return true;
} }
else if (otherIc.getInstruction() instanceof IfICmpNe) else if (otherIc.getInstruction() instanceof IfICmpEq || otherIc.getInstruction() instanceof IfICmpNe)
{ {
StackContext s1 = otherIc.getPops().get(0), StackContext s1 = otherIc.getPops().get(0),
s2 = otherIc.getPops().get(1); s2 = otherIc.getPops().get(1);