Cleanup block removal

This commit is contained in:
Adam
2015-05-11 10:25:00 -04:00
parent fa3e9c0262
commit 64d41c6f92
4 changed files with 61 additions and 19 deletions

View File

@@ -11,6 +11,7 @@ import java.util.List;
public abstract class Instruction
{
private Instructions instructions;
public Block block;
private InstructionType type;
private int pc; // offset into method this instructions resides at
@@ -29,6 +30,8 @@ public abstract class Instruction
protected void remove()
{
assert block == null;
for (Instruction i : jump)
i.from.remove(this);
jump.clear();