Author: Carl Friedrich Bolz <cfb...@gmx.de>
Branch: guard-compatible
Changeset: r83070:cadb6f1c1225
Date: 2016-03-15 14:49 +0100
http://bitbucket.org/pypy/pypy/changeset/cadb6f1c1225/

Log:    avoid some operations

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
@@ -129,6 +129,10 @@
     def length(self):
         raise NotImplementedError("abstract base class")
 
+    @jit.guard_compatible()
+    def _length_larger_than(self, n):
+        return self.length() > n
+
     def get_terminator(self):
         return self.terminator
 
@@ -659,7 +663,7 @@
             self.map = map
 
         def _has_storage_list(self):
-            return self.map.length() > n
+            return self.map._length_larger_than(n)
 
         def _mapdict_get_storage_list(self):
             erased = getattr(self, valnmin1)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to