Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ac9c3e

Browse files
committed
Make sure the JUMP_ABSOLUTE and POP_BLOCK at the end of a for loop are
contiguous.
1 parent cbfc855 commit 2ac9c3e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/compiler/pycodegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def visitFor(self, node):
363363
self.visit(node.assign)
364364
self.visit(node.body)
365365
self.emit('JUMP_ABSOLUTE', start)
366-
self.startBlock(anchor)
366+
self.nextBlock(anchor)
367367
self.emit('POP_BLOCK')
368368
self.loops.pop()
369369
if node.else_:

Tools/compiler/compiler/pycodegen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def visitFor(self, node):
363363
self.visit(node.assign)
364364
self.visit(node.body)
365365
self.emit('JUMP_ABSOLUTE', start)
366-
self.startBlock(anchor)
366+
self.nextBlock(anchor)
367367
self.emit('POP_BLOCK')
368368
self.loops.pop()
369369
if node.else_:

0 commit comments

Comments
 (0)