[pypy-svn] r18253 - pypy/dist/pypy/interpreter/astcompiler
ac at codespeak.net
ac at codespeak.net
Fri Oct 7 11:27:41 CEST 2005
Author: ac
Date: Fri Oct 7 11:27:41 2005
New Revision: 18253
Modified:
pypy/dist/pypy/interpreter/astcompiler/pyassem.py
Log:
Do not generate lineno before the implicit return.
Modified: pypy/dist/pypy/interpreter/astcompiler/pyassem.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pyassem.py (original)
+++ pypy/dist/pypy/interpreter/astcompiler/pyassem.py Fri Oct 7 11:27:41 2005
@@ -564,6 +564,10 @@
end = {}
forward_refs = []
for b in self.orderedblocks:
+ # Prune any setlineno before the 'implicit return' block.
+ if b is self.exit:
+ while len(insts) and insts[-1].op == "SET_LINENO":
+ insts.pop()
begin[b] = pc
for inst in b.getInstructions():
if not inst.has_arg:
More information about the Pypy-commit
mailing list