From: Jeremy Hylton Date: Tue, 28 Aug 2001 17:28:33 +0000 (+0000) Subject: Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop are X-Git-Tag: v2.2a3~278 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ac9c3eec5807b6032e5aef6481fcf67c1965efc;p=thirdparty%2FPython%2Fcpython.git Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop are contiguous. --- diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py index 37dbcfdfe596..882e6b1a2bfe 100644 --- a/Lib/compiler/pycodegen.py +++ b/Lib/compiler/pycodegen.py @@ -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_: diff --git a/Tools/compiler/compiler/pycodegen.py b/Tools/compiler/compiler/pycodegen.py index 37dbcfdfe596..882e6b1a2bfe 100644 --- a/Tools/compiler/compiler/pycodegen.py +++ b/Tools/compiler/compiler/pycodegen.py @@ -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_: