[pypy-commit] pypy default: merge
fijal
noreply at buildbot.pypy.org
Tue Dec 27 19:28:00 CET 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r50910:56272f637518
Date: 2011-12-27 20:27 +0200
http://bitbucket.org/pypy/pypy/changeset/56272f637518/
Log: merge
diff --git a/pypy/jit/metainterp/heapcache.py b/pypy/jit/metainterp/heapcache.py
--- a/pypy/jit/metainterp/heapcache.py
+++ b/pypy/jit/metainterp/heapcache.py
@@ -79,9 +79,9 @@
opnum == rop.COPYSTRCONTENT or
opnum == rop.COPYUNICODECONTENT):
return
- if rop._OVF_FIRST <= opnum <= rop._OVF_LAST:
- return
- if rop._NOSIDEEFFECT_FIRST <= opnum <= rop._NOSIDEEFFECT_LAST:
+ if (rop._OVF_FIRST <= opnum <= rop._OVF_LAST or
+ rop._NOSIDEEFFECT_FIRST <= opnum <= rop._NOSIDEEFFECT_LAST or
+ rop._GUARD_FIRST <= opnum <= rop._GUARD_LAST):
return
if opnum == rop.CALL or opnum == rop.CALL_LOOPINVARIANT:
effectinfo = descr.get_extra_info()
diff --git a/pypy/jit/metainterp/test/test_heapcache.py b/pypy/jit/metainterp/test/test_heapcache.py
--- a/pypy/jit/metainterp/test/test_heapcache.py
+++ b/pypy/jit/metainterp/test/test_heapcache.py
@@ -255,6 +255,11 @@
assert h.getarrayitem(box1, descr1, index1) is box2
assert h.getarrayitem(box1, descr1, index2) is box4
+ h.invalidate_caches(rop.GUARD_TRUE, None, [])
+ assert h.getfield(box1, descr1) is box2
+ assert h.getarrayitem(box1, descr1, index1) is box2
+ assert h.getarrayitem(box1, descr1, index2) is box4
+
h.invalidate_caches(
rop.CALL_LOOPINVARIANT, FakeCallDescr(FakeEffektinfo.EF_LOOPINVARIANT), [])
diff --git a/pypy/module/micronumpy/strides.py b/pypy/module/micronumpy/strides.py
--- a/pypy/module/micronumpy/strides.py
+++ b/pypy/module/micronumpy/strides.py
@@ -1,4 +1,9 @@
+from pypy.rlib import jit
+
+ at jit.look_inside_iff(lambda shape, start, strides, backstrides, chunks:
+ jit.isconstant(len(chunks))
+)
def calculate_slice_strides(shape, start, strides, backstrides, chunks):
rstrides = []
rbackstrides = []
More information about the pypy-commit
mailing list