Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r50380:f0e6f9c06870
Date: 2011-12-11 13:49 +0100
http://bitbucket.org/pypy/pypy/changeset/f0e6f9c06870/

Log:    Hopefully fix test_pypy_c:test_call:test_stararg_virtual, by forcing
        getitems_fixedsize() to unroll small constant-length lists.

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -694,14 +694,16 @@
         return self.wrap(r)
 
     @jit.look_inside_iff(lambda self, w_list:
-            jit.isconstant(w_list.length()) and w_list.length() < 
UNROLL_CUTOFF)
+           jit.isconstant(w_list.length()) and w_list.length() < UNROLL_CUTOFF)
     def getitems_copy(self, w_list):
         return [self.wrap(item) for item in self.unerase(w_list.lstorage)]
 
     @jit.unroll_safe
     def getitems_unroll(self, w_list):
         return [self.wrap(item) for item in self.unerase(w_list.lstorage)]
-    @jit.dont_look_inside
+
+    @jit.look_inside_iff(lambda self, w_list:
+           jit.isconstant(w_list.length()) and w_list.length() < UNROLL_CUTOFF)
     def getitems_fixedsize(self, w_list):
         return self.getitems_unroll(w_list)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to