*
*/
+ 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));
+ }
}