[pypy-commit] pypy unroll-if-alt: useful comment, update tests.

alex_gaynor noreply at buildbot.pypy.org
Mon Sep 19 20:57:05 CEST 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: unroll-if-alt
Changeset: r47355:983e63a634ca
Date: 2011-09-19 14:45 -0400
http://bitbucket.org/pypy/pypy/changeset/983e63a634ca/

Log:	useful comment, update tests.

diff --git a/pypy/jit/metainterp/test/test_slist.py b/pypy/jit/metainterp/test/test_slist.py
--- a/pypy/jit/metainterp/test/test_slist.py
+++ b/pypy/jit/metainterp/test/test_slist.py
@@ -33,7 +33,7 @@
             return m
         res = self.interp_operations(f, [11], listops=True)
         assert res == 49
-        self.check_operations_history(call=5)
+        self.check_operations_history(call=3)
 
     def test_list_of_voids(self):
         myjitdriver = JitDriver(greens = [], reds = ['n', 'lst'])
@@ -92,7 +92,7 @@
             return x
         res = self.meta_interp(f, [-2], listops=True)
         assert res == 41
-        self.check_loops(call=1, guard_value=0)
+        self.check_loops(call=0, guard_value=0)
 
 # we don't support resizable lists on ootype
 #class TestOOtype(ListTests, OOJitMixin):
diff --git a/pypy/rlib/jit.py b/pypy/rlib/jit.py
--- a/pypy/rlib/jit.py
+++ b/pypy/rlib/jit.py
@@ -117,6 +117,8 @@
     """
     def inner(func):
         func_unroll = unroll_safe(func_with_new_name(func, func.__name__ + "_unroll"))
+        # Remove the oopspec, it prevents inlining, which is kinda the whole
+        # point of this rigamaroll.
         if hasattr(func_unroll, "oopspec"):
             del func_unroll.oopspec
         func = dont_look_inside(func)


More information about the pypy-commit mailing list