[pypy-commit] pypy unroll-if-alt: take the direct path also when not jitting

cfbolz noreply at buildbot.pypy.org
Tue Sep 20 16:07:59 CEST 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: unroll-if-alt
Changeset: r47369:4d6c1b37980e
Date: 2011-09-20 16:07 +0200
http://bitbucket.org/pypy/pypy/changeset/4d6c1b37980e/

Log:	take the direct path also when not jitting

diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -128,6 +128,7 @@
             "dont_look_inside": dont_look_inside,
             "predicate": predicate,
             "func": func,
+            "we_are_jitted": we_are_jitted,
         }
         exec py.code.Source("""
             @dont_look_inside
@@ -141,7 +142,7 @@
             trampoline._annspecialcase_ = "specialize:call_location"
 
             def f(%(arguments)s):
-                if predicate(%(arguments)s):
+                if not we_are_jitted() or predicate(%(arguments)s):
                     return func(%(arguments)s)
                 else:
                     return trampoline(%(arguments)s)


More information about the pypy-commit mailing list