update interpreter to reset counters on kill/massacre
authoradam <adam@megacz.com>
Tue, 12 Feb 2008 09:12:28 +0000 (10:12 +0100)
committeradam <adam@megacz.com>
Tue, 12 Feb 2008 09:12:28 +0000 (10:12 +0100)
src/edu/berkeley/fleet/interpreter/InstructionPump.java

index 3c06ccf..941662c 100644 (file)
@@ -32,12 +32,15 @@ abstract class InstructionPump extends InterpreterPump {
 
     public void massacre() {
         executing = null;
+        loopCounter = 0;
+        repeatCounter = 1;
         while(instructions.size() > 0)
             instructions.remove();
     }
 
     public void kill(int count, boolean killOnlyStandingInstructions) {
         if (count==0) return;
+        repeatCounter = 1;
         if (!killOnlyStandingInstructions) {
             if (executing != null) { executing = null; count--; }
             for(;count > 0;count--) {