Author: Spenser Andrew Bauman <saba...@gmail.com>
Branch: remove-getfield-pure
Changeset: r81751:1ddab6bd3654
Date: 2016-01-13 18:23 -0500
http://bitbucket.org/pypy/pypy/changeset/1ddab6bd3654/

Log:    Don't invalidate field caches for immutable fields

diff --git a/rpython/jit/metainterp/optimizeopt/heap.py 
b/rpython/jit/metainterp/optimizeopt/heap.py
--- a/rpython/jit/metainterp/optimizeopt/heap.py
+++ b/rpython/jit/metainterp/optimizeopt/heap.py
@@ -183,6 +183,8 @@
         return res
 
     def invalidate(self, descr):
+        if descr.is_always_pure():
+            return
         for opinfo in self.cached_infos:
             assert isinstance(opinfo, info.AbstractStructPtrInfo)
             opinfo._fields[descr.get_index()] = None
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to