Fix tests
This commit is contained in:
@@ -32,6 +32,13 @@ public abstract class If extends Instruction implements JumpingInstruction, Comp
|
||||
super(instructions, type, pc);
|
||||
}
|
||||
|
||||
public If(Instructions instructions, InstructionType type, Instruction to)
|
||||
{
|
||||
super(instructions, type, -1);
|
||||
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public If(Instructions instructions, Instruction to)
|
||||
{
|
||||
super(instructions, InstructionType.IF_ICMPNE, -1);
|
||||
|
||||
@@ -32,9 +32,9 @@ public abstract class If0 extends Instruction implements JumpingInstruction, Com
|
||||
super(instructions, type, pc);
|
||||
}
|
||||
|
||||
public If0(Instructions instructions, Instruction to)
|
||||
public If0(Instructions instructions, InstructionType type, Instruction to)
|
||||
{
|
||||
super(instructions, InstructionType.IFEQ, -1);
|
||||
super(instructions, type, -1);
|
||||
|
||||
assert this != to;
|
||||
assert to.getInstructions() == this.getInstructions();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.runelite.deob.attributes.code.instructions;
|
||||
|
||||
import net.runelite.deob.attributes.code.Instruction;
|
||||
import net.runelite.deob.attributes.code.InstructionType;
|
||||
import net.runelite.deob.attributes.code.Instructions;
|
||||
import static net.runelite.deob.attributes.code.instructions.IfICmpEq.isOne;
|
||||
@@ -14,6 +15,11 @@ public class IfEq extends If0
|
||||
{
|
||||
super(instructions, type, pc);
|
||||
}
|
||||
|
||||
public IfEq(Instructions instructions, Instruction to)
|
||||
{
|
||||
super(instructions, InstructionType.IFEQ, to);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSame(InstructionContext thisIc, InstructionContext otherIc)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package net.runelite.deob.attributes.code.instructions;
|
||||
|
||||
import net.runelite.deob.attributes.code.Instruction;
|
||||
import net.runelite.deob.attributes.code.InstructionType;
|
||||
import net.runelite.deob.attributes.code.Instructions;
|
||||
import net.runelite.deob.attributes.code.instruction.types.PushConstantInstruction;
|
||||
@@ -14,6 +15,11 @@ public class IfICmpEq extends If
|
||||
super(instructions, type, pc);
|
||||
}
|
||||
|
||||
public IfICmpEq(Instructions instructions, Instruction to)
|
||||
{
|
||||
super(instructions, InstructionType.IF_ICMPEQ, to);
|
||||
}
|
||||
|
||||
static boolean is(StackContext s, int val)
|
||||
{
|
||||
if (s.getPushed().getInstruction() instanceof PushConstantInstruction)
|
||||
|
||||
Reference in New Issue
Block a user