From e9bc4d2ef844d5fef41f34ab554ffcba99d79f62 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 12 Feb 2008 10:12:28 +0100 Subject: [PATCH] update interpreter to reset counters on kill/massacre --- src/edu/berkeley/fleet/interpreter/InstructionPump.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/edu/berkeley/fleet/interpreter/InstructionPump.java b/src/edu/berkeley/fleet/interpreter/InstructionPump.java index 3c06ccf..941662c 100644 --- a/src/edu/berkeley/fleet/interpreter/InstructionPump.java +++ b/src/edu/berkeley/fleet/interpreter/InstructionPump.java @@ -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--) { -- 1.7.10.4