ILOC: allow moving instruction between programs, aligned comment prettyPrint
This commit is contained in:
parent
8fa96cb362
commit
7ddbca1ef1
|
@ -34,7 +34,7 @@ public abstract class Instr implements Iterable<Op> {
|
|||
|
||||
/** Sets the line number of this instruction. */
|
||||
void setLine(int line) {
|
||||
assert this.line < 0 && line >= 0;
|
||||
assert line >= 0;
|
||||
this.line = line;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ public abstract class Instr implements Iterable<Op> {
|
|||
/** Sets the program in which this instruction occurs.
|
||||
*/
|
||||
void setProgram(Program prog) {
|
||||
assert this.prog == null & prog != null;
|
||||
assert prog != null;
|
||||
this.prog = prog;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ public class Op extends Instr {
|
|||
if (getClaz() == COMMENT) {
|
||||
result.append(toCommentString());
|
||||
}
|
||||
if (getOpCode() == OpCode.out) {
|
||||
else if (getOpCode() == OpCode.out) {
|
||||
int size = sourceSize + targetSize + arrowSize;
|
||||
result.append(String.format("%-8s", getOpCode().name()));
|
||||
result.append(String.format("%-" + size + "s ", toSourceString()));
|
||||
|
|
Loading…
Reference in New Issue