[pypy-svn] r17534 - pypy/dist/pypy/interpreter/astcompiler
pedronis at codespeak.net
pedronis at codespeak.net
Tue Sep 13 18:51:29 CEST 2005
Author: pedronis
Date: Tue Sep 13 18:51:27 2005
New Revision: 17534
Modified:
pypy/dist/pypy/interpreter/astcompiler/pyassem.py
Log:
max on lists is not RPython
Modified: pypy/dist/pypy/interpreter/astcompiler/pyassem.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pyassem.py (original)
+++ pypy/dist/pypy/interpreter/astcompiler/pyassem.py Tue Sep 13 18:51:27 2005
@@ -534,7 +534,12 @@
d = d + depth[b]
children = b.get_children()
if children:
- return max([ self._max_depth(depth, seen, c, d) for c in children])
+ maxd = -1
+ for c in children:
+ childd =self._max_depth(depth, seen, c, d)
+ if childd > maxd:
+ maxd = childd
+ return maxd
else:
if not b.label == "exit":
return self._max_depth(depth, seen, self.exit, d)
More information about the Pypy-commit
mailing list