[pypy-commit] pypy default: Hopefully fix test_pypy_c:test_call:test_stararg_virtual, by forcing

arigo noreply at buildbot.pypy.org
Sun Dec 11 13:50:10 CET 2011


Author: Armin Rigo <arigo at tunes.org>
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)
 


More information about the pypy-commit mailing list