1.1 --- a/bytecode.py Mon Nov 08 00:30:55 2004 +0100
1.2 +++ b/bytecode.py Mon Nov 08 21:59:24 2004 +0100
1.3 @@ -99,6 +99,12 @@
1.4 # NOTE: EXTENDED_ARG not yet supported.
1.5 raise ValueError, value
1.6
1.7 + def setup_loop(self):
1.8 + self.loops.push(self.position)
1.9 + self.output.append(opmap["SETUP_LOOP"])
1.10 + self.position += 1
1.11 + self._write_value(0) # To be filled in later
1.12 +
1.13 def end_loop(self):
1.14 current_loop_start = self.loops.pop()
1.15 self.jump_absolute(current_loop_start)
1.16 @@ -337,6 +343,10 @@
1.17 self.position += 1
1.18 self._write_value(count)
1.19
1.20 + def pop_block(self):
1.21 + self.output.append(opmap["POP_BLOCK"])
1.22 + self.position += 1
1.23 +
1.24 # Utility classes and functions.
1.25
1.26 class LazyDict(UserDict):