Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop are
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 28 Aug 2001 17:28:33 +0000 (17:28 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 28 Aug 2001 17:28:33 +0000 (17:28 +0000)
contiguous.

Lib/compiler/pycodegen.py
Tools/compiler/compiler/pycodegen.py

index 37dbcfdfe59635b5b14e2636ef04b8542335e054..882e6b1a2bfe1911536def30aac14aaf074a3fef 100644 (file)
@@ -363,7 +363,7 @@ class CodeGenerator:
         self.visit(node.assign)
         self.visit(node.body)
         self.emit('JUMP_ABSOLUTE', start)
-        self.startBlock(anchor)
+        self.nextBlock(anchor)
         self.emit('POP_BLOCK')
         self.loops.pop()
         if node.else_:
index 37dbcfdfe59635b5b14e2636ef04b8542335e054..882e6b1a2bfe1911536def30aac14aaf074a3fef 100644 (file)
@@ -363,7 +363,7 @@ class CodeGenerator:
         self.visit(node.assign)
         self.visit(node.body)
         self.emit('JUMP_ABSOLUTE', start)
-        self.startBlock(anchor)
+        self.nextBlock(anchor)
         self.emit('POP_BLOCK')
         self.loops.pop()
         if node.else_: