lift sloppy getPathByAddr() implementation into FleetTwoFleet
[fleet.git] / src / edu / berkeley / fleet / interpreter / Interpreter.java
index 69fd939..556650a 100644 (file)
@@ -59,18 +59,12 @@ public class Interpreter extends FleetTwoFleet implements Parser.FleetWithDynami
 
     // Instruction Encoding /////////////////////////////////////////////////////////////////////////
 
-    public Dock getUniversalSource() {
-        // FIXME
-        return debugShip.getDock("in");
-    }
-
     public long getDestAddr(Path path) {
-        // FIXME
-        throw new RuntimeException();
-    }
-    public Path getPathByAddr(Dock source, long dest) {
-        // FIXME
-        throw new RuntimeException();
+        long ret = ((InterpreterDestination)path.getDestination()).addr;
+        BitVector bv = path.getSignal();
+        if (bv.length() > 1) throw new RuntimeException();
+        if (bv.length() > 0 && bv.get(0)) ret |= 1;
+        return ret;
     }