Isolate a test I believe is wrong

This commit is contained in:
Adam
2015-10-03 23:31:00 -04:00
parent f6f487ad6d
commit 9ca8151162
9 changed files with 180 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ public class IConst_2 extends Instruction implements PushConstantInstruction
public IConst_2(Instructions instructions)
{
super(instructions, InstructionType.ICONST_2, 0);
super(instructions, InstructionType.ICONST_2, -1);
}
@Override

View File

@@ -14,6 +14,11 @@ public class IDiv extends Instruction
{
super(instructions, type, pc);
}
public IDiv(Instructions instructions)
{
super(instructions, InstructionType.IDIV, -1);
}
@Override
public void execute(Frame frame)

View File

@@ -23,7 +23,7 @@ public class IStore extends Instruction implements LVTInstruction, WideInstructi
public IStore(Instructions instructions, int index)
{
super(instructions, InstructionType.ISTORE, 0);
super(instructions, InstructionType.ISTORE, -1);
this.index = index;
++length;
}

View File

@@ -16,10 +16,15 @@ import java.io.IOException;
public class IStore_1 extends Instruction implements LVTInstruction
{
public IStore_1(Instructions instructions, InstructionType type, int pc) throws IOException
public IStore_1(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
public IStore_1(Instructions instructions)
{
super(instructions, InstructionType.ISTORE_1, -1);
}
@Override
public void execute(Frame frame)

View File

@@ -16,10 +16,15 @@ import java.io.IOException;
public class IStore_2 extends Instruction implements LVTInstruction
{
public IStore_2(Instructions instructions, InstructionType type, int pc) throws IOException
public IStore_2(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}
public IStore_2(Instructions instructions)
{
super(instructions, InstructionType.ISTORE_2, -1);
}
@Override
public void execute(Frame frame)

View File

@@ -26,6 +26,16 @@ public class If extends Instruction implements JumpingInstruction, ComparisonIns
super(instructions, type, pc);
}
public If(Instructions instructions, Instruction to)
{
super(instructions, InstructionType.IF_ICMPNE, -1);
assert this != to;
assert to.getInstructions() == this.getInstructions();
this.to = to;
}
@Override
public void load(DataInputStream is) throws IOException
{

View File

@@ -26,6 +26,16 @@ public class If0 extends Instruction implements JumpingInstruction, ComparisonIn
super(instructions, type, pc);
}
public If0(Instructions instructions, Instruction to)
{
super(instructions, InstructionType.IFEQ, -1);
assert this != to;
assert to.getInstructions() == this.getInstructions();
this.to = to;
}
@Override
public void load(DataInputStream is) throws IOException
{

View File

@@ -10,7 +10,7 @@ import java.io.IOException;
public class NOP extends Instruction
{
public NOP(Instructions instructions, InstructionType type, int pc) throws IOException
public NOP(Instructions instructions, InstructionType type, int pc)
{
super(instructions, type, pc);
}