Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r76946:76b0dfb05efb
Date: 2015-04-27 21:31 +0200
http://bitbucket.org/pypy/pypy/changeset/76b0dfb05efb/

Log:    Add a @signature here (seen by translating
        https://github.com/cgswords/laurens/blob/master/laurens/stg.py at
        baa4326)

diff --git a/rpython/rtyper/lltypesystem/rordereddict.py 
b/rpython/rtyper/lltypesystem/rordereddict.py
--- a/rpython/rtyper/lltypesystem/rordereddict.py
+++ b/rpython/rtyper/lltypesystem/rordereddict.py
@@ -3,7 +3,8 @@
 from rpython.flowspace.model import Constant
 from rpython.rtyper.rdict import AbstractDictRepr, AbstractDictIteratorRepr
 from rpython.rtyper.lltypesystem import lltype, llmemory, rffi
-from rpython.rlib import objectmodel, jit, rgc
+from rpython.rlib import objectmodel, jit, rgc, types
+from rpython.rlib.signature import signature
 from rpython.rlib.objectmodel import specialize, likely
 from rpython.rlib.debug import ll_assert
 from rpython.rlib.rarithmetic import r_uint, intmask
@@ -515,9 +516,11 @@
     dummy = ENTRIES.dummy_obj.ll_dummy_value
     entries[i].value = dummy
 
+@signature(types.any(), types.int(), returns=types.any())
 def ll_hash_from_cache(entries, i):
     return entries[i].f_hash
 
+@signature(types.any(), types.int(), returns=types.any())
 def ll_hash_recomputed(entries, i):
     ENTRIES = lltype.typeOf(entries).TO
     return ENTRIES.fasthashfn(entries[i].key)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to