[pypy-svn] r39682 - pypy/dist/pypy/annotation

antocuni at codespeak.net antocuni at codespeak.net
Fri Mar 2 15:12:59 CET 2007


Author: antocuni
Date: Fri Mar  2 15:12:58 2007
New Revision: 39682

Modified:
   pypy/dist/pypy/annotation/builtin.py
Log:
(antocuni, pedronis)

try to make the memory used by the annotator not linear in the length of the range().



Modified: pypy/dist/pypy/annotation/builtin.py
==============================================================================
--- pypy/dist/pypy/annotation/builtin.py	(original)
+++ pypy/dist/pypy/annotation/builtin.py	Fri Mar  2 15:12:58 2007
@@ -65,7 +65,7 @@
         if step == 0:
             raise Exception, "range() with step zero"
         if s_start.is_constant() and s_stop.is_constant():
-            if len(range(s_start.const, s_stop.const, step)) == 0:
+            if len(xrange(s_start.const, s_stop.const, step)) == 0:
                 empty = True
     if empty:
         s_item = s_ImpossibleValue



More information about the Pypy-commit mailing list