Did I find the right examples for you? yes no

All Samples(62)  |  Call(41)  |  Derive(0)  |  Import(21)

src/s/y/Sypy-HEAD/rlib/_rweakkeydict.py   Sypy(Download)
from pypy.rlib.rweakref import RWeakKeyDictionary
from pypy.rlib import jit
from pypy.rlib.objectmodel import compute_identity_hash
from pypy.rlib.objectmodel import we_are_translated
 
def ll_debugrepr(x):
    if x:
        h = compute_identity_hash(x)
    else:
        h = 0
def ll_get(d, llkey):
    hash = compute_identity_hash(llkey)
    i = rdict.ll_dict_lookup(d, llkey, hash) & rdict.MASK
    #llop.debug_print(lltype.Void, i, 'get', hex(hash),
    #                 ll_debugrepr(d.entries[i].key),
def ll_set_nonnull(d, llkey, llvalue):
    hash = compute_identity_hash(llkey)
    keyref = weakref_create(llkey)    # GC effects here, before the rest
    i = rdict.ll_dict_lookup(d, llkey, hash) & rdict.MASK
    everused = d.entries.everused(i)
def ll_set_null(d, llkey):
    hash = compute_identity_hash(llkey)
    i = rdict.ll_dict_lookup(d, llkey, hash) & rdict.MASK
    if d.entries.everused(i):
        # If the entry was ever used, clean up its key and value.

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/util.py   Sypy(Download)
import py
from pypy.rlib.objectmodel import r_dict, compute_identity_hash
from pypy.rlib.rarithmetic import intmask
from pypy.rlib.unroll import unrolling_iterable
from pypy.jit.metainterp import resoperation, history
def descrlist_hash(l):
    res = 0x345678
    for descr in l:
        y = compute_identity_hash(descr)
        res = intmask((1000003 * res) ^ y)

src/s/y/Sypy-HEAD/jit/metainterp/history.py   Sypy(Download)
from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.codewriter import heaptracker, longlong
from pypy.rlib.objectmodel import compute_identity_hash
import weakref
 
    def _get_hash_(self):
        return compute_identity_hash(self)
 
    def clonebox(self):
        raise NotImplementedError

src/s/y/Sypy-HEAD/module/micronumpy/signature.py   Sypy(Download)
from pypy.rlib.objectmodel import r_dict, compute_identity_hash, compute_hash
from pypy.rlib.rarithmetic import intmask
from pypy.module.micronumpy.interp_iter import ConstantIterator, AxisIterator,\
     ViewTransform, BroadcastTransform
from pypy.tool.pairtype import extendabletype
    def hash(self):
        return compute_identity_hash(self.dtype)
 
class ArraySignature(ConcreteSignature):
    def debug_repr(self):

src/s/y/Sypy-HEAD/interpreter/typedef.py   Sypy(Download)
from pypy.interpreter.error import OperationError, operationerrfmt
from pypy.tool.sourcetools import compile2, func_with_new_name
from pypy.rlib.objectmodel import instantiate, compute_identity_hash, specialize
from pypy.rlib.jit import promote
 
def default_identity_hash(space, w_obj):
    w_unique_id = w_obj.immutable_unique_id(space)
    if w_unique_id is None:     # common case
        return space.wrap(compute_identity_hash(w_obj))
    else:

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/interpreter/typedef.py   plexnet(Download)
from pypy.interpreter.error import OperationError
from pypy.tool.sourcetools import compile2, func_with_new_name
from pypy.rlib.objectmodel import instantiate, compute_identity_hash
from pypy.rlib.jit import hint
 
def default_identity_hash(space, w_obj):
    return space.wrap(compute_identity_hash(w_obj))
 
def descr__hash__unhashable(space, w_obj):
    typename = space.type(w_obj).getname(space, '?')

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/__builtin__/interp_classobj.py   plexnet(Download)
from pypy.interpreter.baseobjspace import Wrappable
from pypy.rlib.rarithmetic import r_uint, intmask
from pypy.rlib.objectmodel import compute_identity_hash
 
 
                                     space.wrap("unhashable instance"))
            else:
                return space.wrap(compute_identity_hash(self))
        w_ret = space.call_function(w_func)
        if (not space.is_true(space.isinstance(w_ret, space.w_int)) and

src/s/y/Sypy-HEAD/module/__builtin__/interp_classobj.py   Sypy(Download)
from pypy.interpreter.baseobjspace import Wrappable
from pypy.interpreter.typedef import GetSetProperty, descr_get_dict, descr_set_dict
from pypy.rlib.objectmodel import compute_identity_hash
from pypy.rlib.debug import make_sure_not_resized
from pypy.rlib import jit
                                     space.wrap("unhashable instance"))
            else:
                return space.wrap(compute_identity_hash(self))
        w_ret = space.call_function(w_func)
        if (not space.is_true(space.isinstance(w_ret, space.w_int)) and

src/s/y/Sypy-HEAD/translator/c/test/test_newgc.py   Sypy(Download)
    def define_hash_preservation(cls):
        from pypy.rlib.objectmodel import compute_hash
        from pypy.rlib.objectmodel import compute_identity_hash
        from pypy.rlib.objectmodel import current_object_addr_as_int
        class C:
                                 ('a', lltype.Array(lltype.Signed)))
        s = lltype.malloc(S, 15, zero=True)
        h_s = compute_identity_hash(s)   # varsized: hash not saved/restored
        #
        def f():
            if compute_hash(c) != compute_identity_hash(c): return 12
            h_c2 = compute_hash(c2)
            if compute_hash(c2) != h_c2: return 15
            if compute_identity_hash(s) == h_s: return 16   # unlikely
            i = 0
            while i < 6:
    def define_hash_overflow(self):
        from pypy.rlib.objectmodel import compute_identity_hash
        class X(object):
            pass
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/test/test_newgc.py   plexnet(Download)
    def define_hash_preservation(cls):
        from pypy.rlib.objectmodel import compute_hash
        from pypy.rlib.objectmodel import compute_identity_hash
        from pypy.rlib.objectmodel import current_object_addr_as_int
        class C:
                                 ('a', lltype.Array(lltype.Signed)))
        s = lltype.malloc(S, 15, zero=True)
        h_s = compute_identity_hash(s)   # varsized: hash not saved/restored
        #
        def f():
            if compute_hash(c) != compute_identity_hash(c): return 12
            h_c2 = compute_hash(c2)
            if compute_hash(c2) != h_c2: return 15
            if compute_identity_hash(s) == h_s: return 16   # unlikely
            i = 0
            while i < 6:
    def define_hash_overflow(self):
        from pypy.rlib.objectmodel import compute_identity_hash
        class X(object):
            pass
 

  1 | 2  Next