update Process to declare certain loops torpedoable
authormegacz <adam@megacz.com>
Fri, 13 Mar 2009 17:37:43 +0000 (10:37 -0700)
committermegacz <adam@megacz.com>
Fri, 13 Mar 2009 17:37:43 +0000 (10:37 -0700)
src/edu/berkeley/fleet/ir/Process.java
src/edu/berkeley/fleet/loops/LoopFactory.java

index 590332f..6b35112 100644 (file)
@@ -229,7 +229,7 @@ public class Process {
                 if (peer!=null)
                     for(int i=0; i<inflight; i++) peer.sendToken(lf);
 
-                lf = lf.makeNext(count);
+                lf = lf.makeNext(count, true);
                 for(int i=0; i<pattern.length; i++) {
                     if (pattern[i]==null) {
                         if (peer!=null) {
index 0fed714..a95e715 100644 (file)
@@ -84,6 +84,7 @@ public class LoopFactory {
 
     public LoopFactory makeNext(int new_count) { return makeNext(new_count, null); }
     public LoopFactory makeNext(int new_count, String newFriendlyName) { return makeNext(new_count, new_count==0, newFriendlyName); }
+    public LoopFactory makeNext(int new_count, boolean newTorpedoable) { return makeNext(new_count, newTorpedoable, null); }
     public LoopFactory makeNext(int new_count, boolean newTorpedoable, String newFriendlyName) {
         if (next != null) throw new RuntimeException("loop already has a successor");
         return new LoopFactory(ctx, dock, new_count, newTorpedoable, newFriendlyName, this);