[pypy-svn] r58703 - pypy/dist/pypy/config

arigo at codespeak.net arigo at codespeak.net
Tue Oct 7 11:50:37 CEST 2008


Author: arigo
Date: Tue Oct  7 11:50:36 2008
New Revision: 58703

Modified:
   pypy/dist/pypy/config/translationoption.py
Log:
Make listcompr off by default again.  Turn it on for translate.py
in all opt levels except -O0.  Fixes many oo tests.


Modified: pypy/dist/pypy/config/translationoption.py
==============================================================================
--- pypy/dist/pypy/config/translationoption.py	(original)
+++ pypy/dist/pypy/config/translationoption.py	Tue Oct  7 11:50:36 2008
@@ -146,7 +146,7 @@
                "When true, look for and special-case the sequence of "
                "operations that results from a list comprehension and "
                "attempt to pre-allocate the list",
-               default=True,
+               default=False,
                cmdline='--listcompr'),
     IntOption("withsmallfuncsets",
               "Represent groups of less funtions than this as indices into an array",
@@ -327,7 +327,6 @@
     for word in words:
         if word == 'nobackendopt':
             config.translation.backendopt.suggest(none=True)
-            config.translation.suggest(list_comprehension_operations=False)
         elif word == 'lowinline':
             config.translation.backendopt.suggest(inline_threshold=
                                                 DEFL_LOW_INLINE_THRESHOLD)
@@ -338,6 +337,9 @@
         else:
             raise ValueError(word)
 
+    hasbackendopts = 'nobackendopt' not in words
+    config.translation.suggest(list_comprehension_operations=hasbackendopts)
+
 # ----------------------------------------------------------------
 
 PLATFORMS = [



More information about the Pypy-commit mailing list