Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/marksweep.py   plexnet(Download)
X_POOL = lltype.GcOpaqueType('gc.pool')
X_POOL_PTR = lltype.Ptr(X_POOL)
X_CLONE = lltype.GcStruct('CloneData', ('gcobjectptr', llmemory.GCREF),
                                       ('pool',        X_POOL_PTR))
X_CLONE_PTR = lltype.Ptr(X_CLONE)
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, False)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_fixedsize._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, False)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_fixedsize_clear._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, True)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_varsize._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, True)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_varsize_clear._dont_inline_ = True
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/c/primitive.py   plexnet(Download)
from pypy.rpython.lltypesystem.lltype import *
from pypy.rpython.lltypesystem import rffi, llgroup
from pypy.rpython.lltypesystem.llmemory import Address, \
     AddressOffset, ItemOffset, ArrayItemsOffset, FieldOffset, \
     CompositeOffset, ArrayLengthOffset, \
    Void:     name_void,
    Address:  name_address,
    GCREF:    name_gcref,
    rffi.USHORT: name_ushort,
    }
    Void:     'void @',
    Address:  'void* @',
    GCREF:    'void* @',
    rffi.USHORT: 'unsigned short @',
    }

src/s/y/Sypy-HEAD/translator/c/primitive.py   Sypy(Download)
from pypy.rpython.lltypesystem.lltype import *
from pypy.rpython.lltypesystem import rffi, llgroup
from pypy.rpython.lltypesystem.llmemory import Address, \
     AddressOffset, ItemOffset, ArrayItemsOffset, FieldOffset, \
     CompositeOffset, ArrayLengthOffset, \
    Void:     name_void,
    Address:  name_address,
    GCREF:    name_gcref,
    }
 
    Void:     'void @',
    Address:  'void* @',
    GCREF:    'void* @',
    }
 

src/s/y/Sypy-HEAD/rpython/memory/gc/marksweep.py   Sypy(Download)
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, False)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_fixedsize._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, False)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_fixedsize_clear._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, True)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_varsize._dont_inline_ = True
 
        #                 '->', llmemory.cast_adr_to_int(result))
        self.write_malloc_statistics(typeid16, tot_size, result, True)
        return llmemory.cast_adr_to_ptr(result, llmemory.GCREF)
    malloc_varsize_clear._dont_inline_ = True
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/hybrid.py   plexnet(Download)
                    totalsize)
                return llmemory.cast_adr_to_ptr(result+size_gc_header,
                                                llmemory.GCREF)
        return self.malloc_varsize_slowpath(typeid, length)
 
        self.init_gc_object(result, typeid, flags)
        (result + size_gc_header + offset_to_length).signed[0] = length
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    malloc_varsize_slowpath._dont_inline_ = True
                                    can_collect = not grow)
        (result + size_gc_header + lengthofs).signed[0] = newlength
        return llmemory.cast_adr_to_ptr(result + size_gc_header, llmemory.GCREF)
 
    def can_move(self, addr):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/llimpl.py   plexnet(Download)
            if getattr(x, '_fake', None):
                return repr(x)
            if lltype.typeOf(x) == llmemory.GCREF:
                TP = lltype.Ptr(lltype.typeOf(x._obj.container))
                ptr = lltype.cast_opaque_ptr(TP, x)
                    if RESTYPE is lltype.Signed:
                        x = self.as_int(result)
                    elif RESTYPE is llmemory.GCREF:
                        x = self.as_ptr(result)
                    elif RESTYPE is ootype.Object:
def cast_to_ptr(x):
    assert isinstance(lltype.typeOf(x), lltype.Ptr)
    return lltype.cast_opaque_ptr(llmemory.GCREF, x)
 
def cast_from_ptr(TYPE, x):
def get_exc_value():
    if _last_exception:
        return lltype.cast_opaque_ptr(llmemory.GCREF, _last_exception.args[1])
    else:
        return lltype.nullptr(llmemory.GCREF.TO)
def get_overflow_error_value():
    return lltype.cast_opaque_ptr(llmemory.GCREF,
                                  _get_error(OverflowError).args[1])
 
def get_zero_division_error():

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/semispace.py   plexnet(Download)
        if contains_weakptr:
            self.objects_with_weakrefs.append(result + size_gc_header)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def malloc_varsize_clear(self, typeid16, length, size, itemsize,
        (result + size_gc_header + offset_to_length).signed[0] = length
        self.free = result + llarena.round_up_for_allocation(totalsize)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def obtain_free_space(self, needed):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/memory/gc/markcompact.py   plexnet(Download)
        if contains_weakptr:
            self.objects_with_weakrefs.append(result + size_gc_header)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def malloc_varsize_clear(self, typeid16, length, size, itemsize,
        (result + size_gc_header + offset_to_length).signed[0] = length
        self.free = result + llarena.round_up_for_allocation(totalsize)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def obtain_free_space(self, totalsize):

src/s/y/Sypy-HEAD/rpython/memory/gc/semispace.py   Sypy(Download)
        if contains_weakptr:
            self.objects_with_weakrefs.append(result + size_gc_header)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def malloc_varsize_clear(self, typeid16, length, size, itemsize,
        (result + size_gc_header + offset_to_length).signed[0] = length
        self.free = result + llarena.round_up_for_allocation(totalsize)
        return llmemory.cast_adr_to_ptr(result+size_gc_header, llmemory.GCREF)
 
    def shrink_array(self, addr, smallerlength):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llsupport/gc.py   plexnet(Download)
        malloc_fn_ptr = rffi.llexternal(GC_MALLOC,
                                        [lltype.Signed], # size_t, but good enough
                                        llmemory.GCREF,
                                        compilation_info=compilation_info,
                                        sandboxsafe=True,
    code that will (for now) always read from this list."""
 
    GCREF_LIST = lltype.GcArray(llmemory.GCREF)     # followed by the GC
 
    HASHTABLE = rffi.CArray(llmemory.Address)      # ignored by the GC
    def get_address_of_gcref(self, gcref):
        assert lltype.typeOf(gcref) == llmemory.GCREF
        # first look in the hashtable, using an inexact hash (fails after
        # the object moves)
        addr = llmemory.cast_ptr_to_adr(gcref)
        self.fielddescr_tid = get_field_descr(self, self.GCClass.HDR, 'tid')
        self.c_jit_wb_if_flag = ConstInt(self.GCClass.JIT_WB_IF_FLAG)
        self.calldescr_jit_wb = get_call_descr(self, [llmemory.GCREF,
                                                      llmemory.GCREF],
                                               lltype.Void)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next