[pypy-svn] r67035 - pypy/branch/pyjitpl5/pypy/jit/backend
benjamin at codespeak.net
benjamin at codespeak.net
Thu Aug 20 16:29:32 CEST 2009
Author: benjamin
Date: Thu Aug 20 16:29:32 2009
New Revision: 67035
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/loopparser.py
Log:
(micke, benjamin) rewrite parse loop to cleaner
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/loopparser.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/loopparser.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/loopparser.py Thu Aug 20 16:29:32 2009
@@ -187,13 +187,12 @@
return i + 1
def _parse(self, lines, i):
- while True:
- try:
- indentation = count_indent(lines[i])
- if indentation == self.current_indentation:
- i = self.parse_next_instruction(lines, i)
- else:
- xxx
- except EndOfBlock:
- return i + 1
+ try:
+ while True:
+ i = self.parse_next_instruction(lines, i)
+ except EndOfBlock:
+ assert i < len(lines)
+ return i + 1
+ else:
+ raise AssertionError("shouldn't happen (python bug????)")
More information about the Pypy-commit
mailing list