Author: Carl Friedrich Bolz <[email protected]>
Branch: improve-heap-caching-tracing
Changeset: r47074:46e1033f28fd
Date: 2011-09-04 13:48 +0200
http://bitbucket.org/pypy/pypy/changeset/46e1033f28fd/

Log:    more cases where invalidation is not necessary

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
@@ -32,7 +32,7 @@
             return
         if rop._NOSIDEEFFECT_FIRST <= opnum <= rop._NOSIDEEFFECT_LAST:
             return
-        if opnum == rop.CALL:
+        if opnum == rop.CALL or opnum == rop.CALL_LOOPINVARIANT:
             effectinfo = descr.get_extra_info()
             ef = effectinfo.extraeffect
             if ef == effectinfo.EF_LOOPINVARIANT or \
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
@@ -226,6 +226,8 @@
         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))
 
         h.invalidate_caches(
             rop.CALL, FakeCallDescr(FakeEffektinfo.EF_RANDOM_EFFECTS))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to