Author: Armin Rigo <ar...@tunes.org> Branch: keys_with_hash Changeset: r79342:836e3fb3e837 Date: 2015-09-01 10:02 +0100 http://bitbucket.org/pypy/pypy/changeset/836e3fb3e837/
Log: fix translation diff --git a/rpython/rlib/objectmodel.py b/rpython/rlib/objectmodel.py --- a/rpython/rlib/objectmodel.py +++ b/rpython/rlib/objectmodel.py @@ -798,12 +798,14 @@ for k in d: yield (k, _expected_hash(d, k)) +@specialize.call_location() def iterkeys_with_hash(d): """Iterates (key, hash) pairs without recomputing the hash.""" if not we_are_translated(): return _iterkeys_with_hash_untranslated(d) return d.iterkeys_with_hash() +@specialize.call_location() def contains_with_hash(d, key, h): """Same as 'key in d'. The extra argument is the hash. Use this only if you got the hash just now from some other ..._with_hash() function.""" @@ -812,6 +814,7 @@ return key in d return d.contains_with_hash(key, h) +@specialize.call_location() def setitem_with_hash(d, key, h, value): """Same as 'd[key] = value'. The extra argument is the hash. Use this only if you got the hash just now from some other ..._with_hash() function.""" @@ -821,6 +824,7 @@ return d.setitem_with_hash(key, h, value) +@specialize.call_location() def getitem_with_hash(d, key, h): """Same as 'd[key]'. The extra argument is the hash. Use this only if you got the hash just now from some other ..._with_hash() function.""" _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit