change pending_dest to pending_path
authoradam <adam@megacz.com>
Mon, 3 Nov 2008 10:12:12 +0000 (11:12 +0100)
committeradam <adam@megacz.com>
Mon, 3 Nov 2008 10:12:12 +0000 (11:12 +0100)
src/edu/berkeley/fleet/ir/Context.java

index 8d430ed..40da894 100644 (file)
@@ -122,7 +122,7 @@ public class Context {
         boolean     pending_latchData = false;
         boolean     pending_latchPath = false;
         boolean     pending_sendToken = false;
-        Destination pending_dest = null;
+        Path        pending_path = null;
 
         void flush_pending() { flush_pending(false); }
         void flush_pending(boolean pending_dataOut) {
@@ -137,7 +137,7 @@ public class Context {
                                           count!=1,
                                           predicate,
                                           pending_interruptible,
-                                          pending_dest==null ? null : dock.getPath(pending_dest,null),
+                                          pending_path==null ? null : pending_path,
                                           pending_recvToken,
                                           pending_recvOrCollect,
                                           pending_latchData,
@@ -151,7 +151,7 @@ public class Context {
             pending_latchData = false;
             pending_latchPath = false;
             pending_sendToken = false;
-            pending_dest = null;
+            pending_path = null;
         }
 
         /** sets the predicate which will be applied to subsequent instructions, or null for the default predicate */
@@ -194,9 +194,10 @@ public class Context {
         }
 
         /** [either], will fuse with previous instruction if it was a recvToken(), recv(), or collect() */
-        public void sendToken(Destination dest) {
+        public void sendToken(Destination dest) { sendToken(dest, null); }
+        public void sendToken(Destination dest, BitVector signal) {
             if (pending_sendToken) flush_pending();
-            pending_dest = dest;
+            pending_path = dock.getPath(dest, signal);
             pending_sendToken = true;
         }
 
@@ -207,10 +208,11 @@ public class Context {
         }
 
         /** [outboxes only], will fuse with previous instruction if it was a sendToken() */
-        public void send(Destination dest) {
-            if (!dock.isOutputDock()) throw new RuntimeException("send() may only be used at output docks");
+        public void send(Destination dest) { send(dest, null); }
+        public void send(Destination dest, BitVector signal) {
+            if (!dock.isOutputDock()) throw new RuntimeException("sendWord() may only be used at output docks");
             if (pending_sendToken) flush_pending();
-            pending_dest = dest;
+            pending_path = dock.getPath(dest, signal);
             flush_pending(true);
         }