- public void addDataFromFabric(Packet p) {
- if (p.isToken()) {
- if (instructionsBackedUpIntoSwitchFabric.size()!=0)
- throw new RuntimeException("torpedo arrived while instructions were backed up into switch fabric");
- if (torpedoWaiting) throw new RuntimeException("two torpedoes collided at dock "+this);
- torpedoWaiting = true;
- return;
- }
-
- Instruction inst =
- getInterpreter().decodeInstruction(p.getValue(),
- InterpreterDock.this /* this is wrong, but harmless */);
- addInstruction(inst);
- }