Another method

This commit is contained in:
Adam
2016-01-11 08:44:49 -05:00
parent f418d95b84
commit 44372c8696
2 changed files with 33 additions and 6 deletions

View File

@@ -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;
}
}