summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/pycodegen.py
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2009-02-06 21:08:52 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2009-02-06 21:08:52 (GMT)
commit4db626f95d9dbb7d52418dee9a96467da3720796 (patch)
tree3a93d86464f93de7af88ac2ef876450803949c04 /Lib/compiler/pycodegen.py
parent0d6705b23473f3b3c22c14a86c9e8af7fb16a917 (diff)
downloadcpython-4db626f95d9dbb7d52418dee9a96467da3720796.zip
cpython-4db626f95d9dbb7d52418dee9a96467da3720796.tar.gz
cpython-4db626f95d9dbb7d52418dee9a96467da3720796.tar.bz2
Overhaul Lib/compiler block ordering. The previous code was filled with
hacks. The new code is based on issue #2472 posted by Antoine Pitrou. I did some further cleanups of the pyassem code and optimized the block ordering pass.
Diffstat (limited to 'Lib/compiler/pycodegen.py')
-rw-r--r--Lib/compiler/pycodegen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/compiler/pycodegen.py b/Lib/compiler/pycodegen.py
index 5d5dca0..808f51f 100644
--- a/Lib/compiler/pycodegen.py
+++ b/Lib/compiler/pycodegen.py
@@ -671,7 +671,7 @@ class CodeGenerator:
self.startBlock(anchor)
self.emit('POP_BLOCK')
self.setups.pop()
- self.startBlock(end)
+ self.nextBlock(end)
self.emit('LOAD_CONST', None)