Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: celldict-versions
Changeset: r45340:25523b8429ab
Date: 2011-07-04 16:47 +0200
http://bitbucket.org/pypy/pypy/changeset/25523b8429ab/

Log:    make quasi-immutable fields actually useful here

diff --git a/pypy/objspace/std/celldict.py b/pypy/objspace/std/celldict.py
--- a/pypy/objspace/std/celldict.py
+++ b/pypy/objspace/std/celldict.py
@@ -43,6 +43,9 @@
        self.version = VersionTag()
 
     def getdictvalue_no_unwrapping(self, w_dict, key):
+        # NB: it's important to promote self here, so that self.version is a
+        # no-op due to the quasi-immutable field
+        self = jit.promote(self)
         return self._getdictvalue_no_unwrapping_pure(self.version, w_dict, key)
 
     @jit.elidable_promote('0,1,2')
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to