fix demos to work with new assertAllocated() lines in writeMem
[fleet.git] / src / edu / berkeley / fleet / loops / Program.java
index bd30f30..8cd4b01 100644 (file)
@@ -34,7 +34,8 @@ public class Program {
         return memoryShip.getDock("inCBD").getDataDestination();
     }
 
-    public long run(FleetProcess fp, CodeBag run, ShipPool pool) {
+    public long run(FleetProcess fp, CodeBag run, ShipPool pool_) {
+        ShipPool pool = new ShipPool(pool_);
         Ship timer    = pool.allocateShip("Timer");
         Ship debug    = pool.allocateShip("Debug");
         Dock debugIn  = debug.getDock("in");
@@ -60,7 +61,9 @@ public class Program {
         start.seal();
         done.seal();
         
-        install(fp, pool);
+        pool.setParent(null);
+        install(fp, pool_);
+        pool.setParent(pool_);
         
         MemoryUtils.putMemoryShipInDispatchMode(fp, memoryShip);
         fp.sendWord(getCBDDestination(), start.getDescriptor().getBitVector());