switch instructions can jump multiple times to the same place

This commit is contained in:
Adam
2015-11-10 10:27:05 -05:00
parent 3edf7e2f4c
commit 782fa9f70a

View File

@@ -221,6 +221,10 @@ public abstract class Instruction implements Cloneable
assert to != null; assert to != null;
assert to != this; assert to != this;
assert this.jump.contains(to) == to.from.contains(this);
if (this.jump.contains(to))
return; // switch statements can jump to the same place multiple times
this.jump.add(to); this.jump.add(to);
to.from.add(this); to.from.add(this);
} }