[pypy-svn] pypy default: fix rpy tests I hope

fijal commits-noreply at bitbucket.org
Mon Mar 14 23:25:58 CET 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r42653:80bd259204b5
Date: 2011-03-14 18:25 -0400
http://bitbucket.org/pypy/pypy/changeset/80bd259204b5/

Log:	fix rpy tests I hope

diff --git a/pypy/jit/metainterp/optimizeopt/__init__.py b/pypy/jit/metainterp/optimizeopt/__init__.py
--- a/pypy/jit/metainterp/optimizeopt/__init__.py
+++ b/pypy/jit/metainterp/optimizeopt/__init__.py
@@ -8,6 +8,7 @@
 from pypy.jit.metainterp.optimizeopt.fficall import OptFfiCall
 from pypy.jit.metainterp.optimizeopt.simplify import OptSimplify
 from pypy.rlib.jit import PARAMETERS
+from pypy.rlib.unroll import unrolling_iterable
 
 ALL_OPTS = [('intbounds', OptIntBounds),
             ('rewrite', OptRewrite),
@@ -17,6 +18,7 @@
             ('ffi', OptFfiCall),
             ('unroll', None)]
 # no direct instantiation of unroll
+unroll_all_opts = unrolling_iterable(ALL_OPTS)
 
 ALL_OPTS_DICT = dict.fromkeys([name for name, _ in ALL_OPTS])
 
@@ -29,7 +31,7 @@
     """
     optimizations = []
     unroll = 'unroll' in enable_opts
-    for name, opt in ALL_OPTS:
+    for name, opt in unroll_all_opts:
         if name in enable_opts:
             if opt is not None:
                 o = opt()
@@ -61,3 +63,6 @@
         pass
     optimize_loop_1(metainterp_sd, bridge, enable_opts,
                     inline_short_preamble, retraced)
+
+if __name__ == '__main__':
+    print ALL_OPTS_NAMES

diff --git a/pypy/jit/metainterp/warmstate.py b/pypy/jit/metainterp/warmstate.py
--- a/pypy/jit/metainterp/warmstate.py
+++ b/pypy/jit/metainterp/warmstate.py
@@ -227,6 +227,8 @@
         from pypy.jit.metainterp.optimizeopt import ALL_OPTS_DICT, ALL_OPTS_NAMES
 
         d = {}
+        if NonConstant(False):
+            value = 'blah' # not a constant ''
         if value is None:
             value = ALL_OPTS_NAMES
         for name in value.split(":"):


More information about the Pypy-commit mailing list