Author: Alex Gaynor <[email protected]>
Branch: unroll-if-alt
Changeset: r47353:7b7294111e91
Date: 2011-09-19 14:22 -0400
http://bitbucket.org/pypy/pypy/changeset/7b7294111e91/
Log: small hack, and now passing tests!
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"))
+ if hasattr(func_unroll, "oopspec"):
+ del func_unroll.oopspec
func = dont_look_inside(func)
# When we return the new function, it might be specialized in some
# way. We "propogate" this specialization by using
diff --git a/pypy/rpython/lltypesystem/rlist.py
b/pypy/rpython/lltypesystem/rlist.py
--- a/pypy/rpython/lltypesystem/rlist.py
+++ b/pypy/rpython/lltypesystem/rlist.py
@@ -233,12 +233,13 @@
else:
_ll_list_resize_really(l, newsize)
[email protected]_inside_iff(lambda l, newsize: jit.isconstant(len(l.items)) and
jit.isconstant(newsize))
[email protected]("list._resize_le(l, newsize)")
def _ll_list_resize_le(l, newsize):
if newsize >= (len(l.items) >> 1) - 5:
l.length = newsize
else:
_ll_list_resize_really(l, newsize)
-_ll_list_resize_le.oopspec = 'list._resize_le(l, newsize)'
def ll_append_noresize(l, newitem):
length = l.length
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit