Did I find the right examples for you? yes no

All Samples(59)  |  Call(59)  |  Derive(0)  |  Import(0)

src/s/y/Sypy-HEAD/rpython/llinterp.py   Sypy(Download)
    def op_cast_adr_to_int(self, adr, mode):
        checkadr(adr)
        return llmemory.cast_adr_to_int(adr, mode)
 
    def op_convert_float_bytes_to_longlong(self, f):

src/s/y/Sypy-HEAD/rpython/lltypesystem/lltype.py   Sypy(Download)
        return llmemory.cast_ptr_to_adr(value)
    elif TGT == Signed and isinstance(ORIG, Ptr) and ORIG.TO._gckind == 'raw':
        return llmemory.cast_adr_to_int(llmemory.cast_ptr_to_adr(value), 'symbolic')
    raise TypeError("don't know how to cast from %r to %r" % (ORIG, TGT))
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/hybrid.py   plexnet(Download)
                hash = (obj + objsize).signed[0]
            else:
                hash = llmemory.cast_adr_to_int(obj)
                tid |= GCFLAG_HASHFIELD
            (newaddr + totalsize).signed[0] = hash
        # is it a tagged pointer?
        if not self.is_valid_gc_object(obj):
            return llmemory.cast_adr_to_int(obj)
 
        if self._is_external(obj):
        else:
            result = self._compute_id(obj)     # common case
        return llmemory.cast_adr_to_int(result) * 2 # see comment in base.py
        # XXX a possible optimization would be to use three dicts, one
        # for each generation, instead of mixing gen2 and gen3 objects.

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/semispace.py   plexnet(Download)
                hash = (obj + objsize).signed[0]
            else:
                hash = llmemory.cast_adr_to_int(obj)
                tid |= GCFLAG_HASHFIELD
            (newaddr + totalsize).signed[0] = hash
                hdr.tid |= GCFLAG_HASHTAKEN
            #
            return llmemory.cast_adr_to_int(obj)  # direct case
 

src/s/y/Sypy-HEAD/jit/codewriter/heaptracker.py   Sypy(Download)
def adr2int(addr):
    # Cast an address to an int.  Returns an AddressAsInt object which
    # can be cast back to an address.
    return llmemory.cast_adr_to_int(addr, "symbolic")
 

src/s/y/Sypy-HEAD/jit/metainterp/history.py   Sypy(Download)
        adr = heaptracker.int2adr(i)
        try:
            return llmemory.cast_adr_to_int(adr, "emulated")
        except NotCtypesAllocatedStructure:
            return 12345 # use an arbitrary number for the hash

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/llinterp.py   plexnet(Download)
    def op_cast_adr_to_int(self, adr):
        checkadr(adr)
        return llmemory.cast_adr_to_int(adr)
 
    def op_weakref_create(self, v_obj):

src/s/y/Sypy-HEAD/rpython/memory/gc/markcompact.py   Sypy(Download)
    def get_identityhash_from_addr(self, obj):
        if translated_to_c():
            return llmemory.cast_adr_to_int(obj)  # direct case
        else:
            try:
                adr = llarena.getfakearenaaddress(obj)   # -> arena address
            except RuntimeError:
                return llmemory.cast_adr_to_int(obj)  # not in an arena...

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/marksweep.py   plexnet(Download)
            return obj.signed[0]
        else:
            return llmemory.cast_adr_to_int(obj)
 
 

src/s/y/Sypy-HEAD/rpython/memory/gc/semispace.py   Sypy(Download)
            return (obj + objsize).signed[0]
        elif gc_hash == GC_HASH_TAKEN_ADDR:
            return llmemory.cast_adr_to_int(obj)
        elif gc_hash == GC_HASH_TAKEN_NURS:
            return self._compute_current_nursery_hash(obj)

  1 | 2 | 3 | 4  Next