updates to get some of the shutdown code to execute via Program
[fleet.git] / src / edu / berkeley / fleet / loops / CodeBag.java
index 1e6a9f2..e14ed17 100644 (file)
@@ -31,13 +31,22 @@ public class CodeBag {
      * 
      */
 
+    final Program program;
+    final Instruction[] instructions;
+    final long baseAddress;
+
     /**
      *  Given a Context, creates a CodeBag which will live in the
      *  Memory ship memoryShip at the address given by baseAddress.
      */
-    public CodeBag(Context ctx, Ship memoryShip, long baseAddress) {
-        
-    }
+    CodeBag(Program program, Instruction[] instructions, long baseAddress) {
+        this.program = program;
+        this.instructions = instructions;
+        this.baseAddress = baseAddress;
 
+        // FIXME
+        if (instructions.length >= (1<<7))
+            throw new RuntimeException("code bag size is "+instructions.length+", which exceeds maximum of "+((1<<7)-1));
+    }
 
 }