Author: Alex Gaynor <[email protected]>
Branch: detect-immutable-fields
Changeset: r68904:cadc0d2ebe59
Date: 2014-01-24 09:07 -0600
http://bitbucket.org/pypy/pypy/changeset/cadc0d2ebe59/

Log:    Re-arrange to only read the field if the things are constants

diff --git a/pypy/objspace/std/mapdict.py b/pypy/objspace/std/mapdict.py
--- a/pypy/objspace/std/mapdict.py
+++ b/pypy/objspace/std/mapdict.py
@@ -35,9 +35,9 @@
         if attr is None:
             return self.terminator._read_terminator(obj, selector)
         if (
-            not attr.ever_mutated and
             jit.isconstant(attr.storageindex) and
-            jit.isconstant(obj)
+            jit.isconstant(obj) and
+            not attr.ever_mutated
         ):
             return self._pure_mapdict_read_storage(obj, attr.storageindex)
         else:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to