[pypy-commit] pypy unroll-if-alt: work around for now.
alex_gaynor
noreply at buildbot.pypy.org
Fri Sep 16 23:50:25 CEST 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: unroll-if-alt
Changeset: r47311:3d6fa69b3ca1
Date: 2011-09-16 17:50 -0400
http://bitbucket.org/pypy/pypy/changeset/3d6fa69b3ca1/
Log: work around for now.
diff --git a/pypy/module/struct/formatiterator.py b/pypy/module/struct/formatiterator.py
--- a/pypy/module/struct/formatiterator.py
+++ b/pypy/module/struct/formatiterator.py
@@ -14,7 +14,10 @@
self.args_index = 0
self.result = [] # list of characters
- @jit.look_inside_iff(lambda self, fmtdesc, repetitions: jit.isconstant(repetitions))
+ # This *should* be always unroll safe, the only way to get here is by
+ # unroll the interpret function, which means the fmt is const, and thus
+ # this should be const (in theory ;)
+ @jit.unroll_safe
@specialize.arg(1)
def operate(self, fmtdesc, repetitions):
if fmtdesc.needcount:
More information about the pypy-commit
mailing list