[pypy-commit] pypy default: Can't use a "for" loop around a jit_merge_point.
arigo
noreply at buildbot.pypy.org
Wed Feb 22 19:18:24 CET 2012
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r52768:75870d03aa4f
Date: 2012-02-22 18:51 +0100
http://bitbucket.org/pypy/pypy/changeset/75870d03aa4f/
Log: Can't use a "for" loop around a jit_merge_point.
diff --git a/pypy/module/micronumpy/interp_support.py b/pypy/module/micronumpy/interp_support.py
--- a/pypy/module/micronumpy/interp_support.py
+++ b/pypy/module/micronumpy/interp_support.py
@@ -79,11 +79,13 @@
'dtype', 's', 'a'])
def fromstring_loop(a, count, dtype, itemsize, s):
- for i in range(count):
+ i = 0
+ while i < count:
fromstring_driver.jit_merge_point(a=a, count=count, dtype=dtype,
itemsize=itemsize, s=s, i=i)
val = dtype.itemtype.runpack_str(s[i*itemsize:i*itemsize + itemsize])
a.dtype.setitem(a.storage, i, val)
+ i += 1
@unwrap_spec(s=str, count=int, sep=str)
def fromstring(space, s, w_dtype=None, count=-1, sep=''):
More information about the pypy-commit
mailing list