* Memory ship memoryShip at the address given by baseAddress.
*/
CodeBag(Program program, Instruction[] instructions, long baseAddress) {
+ int MAX_BAG_SIZE = (1<<7)-1;
+ if (instructions.length > MAX_BAG_SIZE)
+ throw new RuntimeException("warning: code bag size is "+instructions.length+
+ ", which exceeds maximum of "+MAX_BAG_SIZE+
+ "; breaking into multiple bags");
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));
}
}