From: adam Date: Mon, 3 Nov 2008 10:15:38 +0000 (+0100) Subject: add Context.flush() X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c6c403d31cdc8871e6bc1b19c86f9201ccda51f5;p=fleet.git add Context.flush() --- diff --git a/src/edu/berkeley/fleet/ir/Context.java b/src/edu/berkeley/fleet/ir/Context.java index 624ab5c..d26c0cb 100644 --- a/src/edu/berkeley/fleet/ir/Context.java +++ b/src/edu/berkeley/fleet/ir/Context.java @@ -207,6 +207,13 @@ public class Context { flush_pending(true); } + /** [inboxes only], will fuse with previous instruction if it was a sendToken() */ + public void flush() { + if (!dock.isInputDock()) throw new RuntimeException("flush() may only be used at input docks"); + flush_pending(); + instructions.add(new Instruction.Flush(dock, count!=1, predicate)); + } + /** [outboxes only], will fuse with previous instruction if it was a sendToken() */ public void send(Destination dest) { send(dest, null); } public void send(Destination dest, BitVector signal) {