From: megacz Date: Mon, 6 Apr 2009 18:25:56 +0000 (-0700) Subject: fix Move.toString() to print a Path (includes signal bit(s)) rather than a Destination X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=30b553e07fd7a6e45a128129a1bfccbf7d0b461b;p=fleet.git fix Move.toString() to print a Path (includes signal bit(s)) rather than a Destination --- diff --git a/src/edu/berkeley/fleet/api/Instruction.java b/src/edu/berkeley/fleet/api/Instruction.java index e41c0fe..145459f 100644 --- a/src/edu/berkeley/fleet/api/Instruction.java +++ b/src/edu/berkeley/fleet/api/Instruction.java @@ -317,13 +317,22 @@ public abstract class Instruction { else ret.append(!dock.isInputDock() ? ", collect nothing" : ", recv nothing"); } if (dataOut && dock.isInputDock()) ret.append(", deliver"); - if (dataOut && !dock.isInputDock()) ret.append(path==null ? ", send" : ", send to " + path.getDestination()); - if (tokenOut) ret.append(path==null ? ", token" : ", send token to " + path.getDestination()); + if (dataOut && !dock.isInputDock()) ret.append(path==null ? ", send" : ", send to " + pathToString(path)); + if (tokenOut) ret.append(path==null ? ", token" : ", send token to " + pathToString(path)); String s = ret.toString(); s = s.equals("") ? "nop" : s.substring(2); if (interruptible) s = "[T] " + s; return super.toString()+s+";"; } + + private String pathToString(Path path) { + BitVector signal = path.getSignal(); + if (signal!=null) + for(int i=0; i