Did I find the right examples for you? yes no

All Samples(148)  |  Call(105)  |  Derive(0)  |  Import(43)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/interpreter/pycode.py   plexnet(Download)
from pypy.rlib.debug import make_sure_not_resized, make_sure_not_modified
from pypy.rlib import jit
from pypy.rlib.objectmodel import compute_hash
 
# helper
    def descr_code__hash__(self):
        space = self.space
        result =  compute_hash(self.co_name)
        result ^= self.co_argcount
        result ^= self.co_nlocals
        result ^= self.co_flags
        result ^= self.co_firstlineno
        result ^= compute_hash(self.co_code)
        for name in self.co_varnames:  result ^= compute_hash(name)
        for name in self.co_freevars:  result ^= compute_hash(name)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/typeobject.py   plexnet(Download)
from pypy.objspace.std.dictproxyobject import W_DictProxyObject
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.objectmodel import current_object_addr_as_int, compute_hash
from pypy.rlib.jit import hint, purefunction, we_are_jitted, dont_look_inside
from pypy.rlib.rarithmetic import intmask, r_uint
        # the time - so using the fast current_object_addr_as_int() instead
        # of a slower solution like hash() is still a good trade-off.
        hash_name = compute_hash(name)
        method_hash = r_uint(intmask(version_tag_as_int * hash_name)) >> SHIFT
        cached_version_tag = space.method_cache_versions[method_hash]

src/s/y/Sypy-HEAD/interpreter/pycode.py   Sypy(Download)
from pypy.rlib.debug import make_sure_not_resized
from pypy.rlib import jit
from pypy.rlib.objectmodel import compute_hash
from pypy.tool.stdlib_opcode import opcodedesc, HAVE_ARGUMENT
 
    def descr_code__hash__(self):
        space = self.space
        result =  compute_hash(self.co_name)
        result ^= self.co_argcount
        result ^= self.co_nlocals
        result ^= self.co_flags
        result ^= self.co_firstlineno
        result ^= compute_hash(self.co_code)
        for name in self.co_varnames:  result ^= compute_hash(name)
        for name in self.co_freevars:  result ^= compute_hash(name)

src/s/y/Sypy-HEAD/objspace/std/typeobject.py   Sypy(Download)
from pypy.objspace.std import identitydict
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.objectmodel import current_object_addr_as_int, compute_hash
from pypy.rlib.jit import promote, elidable_promote, we_are_jitted,\
     promote_string
        # the time - so using the fast current_object_addr_as_int() instead
        # of a slower solution like hash() is still a good trade-off.
        hash_name = compute_hash(name)
        product = intmask(version_tag_as_int * hash_name)
        method_hash = (r_uint(product) ^ (r_uint(product) << SHIFT1)) >> SHIFT2

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/history.py   plexnet(Download)
from pypy.rpython.ootypesystem import ootype
from pypy.rlib.objectmodel import we_are_translated, r_dict, Symbolic
from pypy.rlib.objectmodel import compute_hash
from pypy.rlib.rarithmetic import intmask
from pypy.tool.uid import uid
    def _get_hash_(self):
        return compute_hash(self.value)
 
    def set_future_value(self, cpu, j):
        cpu.set_future_value_float(j, self.getfloat())
    def _get_hash_(self):
        return compute_hash(self.value)
 
    def set_future_value(self, cpu, j):
        cpu.set_future_value_float(j, self.value)

src/s/y/Sypy-HEAD/objspace/std/mapdict.py   Sypy(Download)
        # ^^^Note: see comment in typeobject.py for
        # _pure_lookup_where_with_method_cache()
        hash_selector = objectmodel.compute_hash(selector)
        product = intmask(attrs_as_int * hash_selector)
        index_hash = (r_uint(product) ^ (r_uint(product) << SHIFT1)) >> SHIFT2

src/s/y/Sypy-HEAD/objspace/std/stringobject.py   Sypy(Download)
from pypy.interpreter import gateway
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rlib.objectmodel import we_are_translated, compute_hash, specialize
from pypy.rlib.objectmodel import compute_unique_id
from pypy.objspace.std.inttype import wrapint
def hash__String(space, w_str):
    s = w_str._value
    x = compute_hash(s)
    return wrapint(space, x)
 

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_hash(self.name) ^ intmask(self.child.hash() << 1)
 
    def eq(self, other, compare_array_no=True):
        if type(self) is not type(other):
    def hash(self):
        return (compute_hash(self.name) ^ intmask(self.left.hash() << 1) ^
                intmask(self.right.hash() << 2))
 
    def eq(self, other, compare_array_no=True):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/objspace/std/stringobject.py   plexnet(Download)
from pypy.interpreter import gateway
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rlib.objectmodel import we_are_translated, compute_hash
from pypy.objspace.std.inttype import wrapint
from pypy.objspace.std.sliceobject import W_SliceObject, normalize_simple_slice
def hash__String(space, w_str):
    s = w_str._value
    x = compute_hash(s)
    return wrapint(space, x)
 

src/s/y/Sypy-HEAD/objspace/std/unicodeobject.py   Sypy(Download)
from pypy.objspace.std.tupleobject import W_TupleObject
from pypy.rlib.rarithmetic import intmask, ovfcheck
from pypy.rlib.objectmodel import compute_hash, specialize
from pypy.rlib.objectmodel import compute_unique_id
from pypy.rlib.rstring import UnicodeBuilder
        h = intmask(x)
        return space.wrap(h)
    x = compute_hash(s)
    return space.wrap(x)
 

  1 | 2 | 3 | 4  Next