Author: Alex Gaynor <[email protected]>
Branch: dynamic-specialized-tuple
Changeset: r54710:10fb8b0fb0df
Date: 2012-04-23 21:56 -0400
http://bitbucket.org/pypy/pypy/changeset/10fb8b0fb0df/

Log:    unroll this so it's actually useful

diff --git a/pypy/objspace/std/tupletype.py b/pypy/objspace/std/tupletype.py
--- a/pypy/objspace/std/tupletype.py
+++ b/pypy/objspace/std/tupletype.py
@@ -4,6 +4,7 @@
 from pypy.interpreter.baseobjspace import W_Root
 from pypy.objspace.std.register_all import register_all
 from pypy.objspace.std.stdtypedef import StdTypeDef, SMM
+from pypy.rlib import jit
 from pypy.rlib.rerased_raw import (UntypedStorage, INT, BOOL, FLOAT, INSTANCE,
     STRING, UNICODE)
 from pypy.rlib.unroll import unrolling_iterable
@@ -89,6 +90,9 @@
             return read(space, storage, idx)
     assert False
 
[email protected]_inside_iff(lambda space, w_tuple, list_w:
+    isvirtual(list_w) or (isconstant(len(list_w)) and len(list_w) <= 5)
+)
 def make_tuple(space, w_tuple, list_w):
     from pypy.objspace.std.tupleobject import W_TupleObject
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to