Did I find the right examples for you? yes no

All Samples(66)  |  Call(43)  |  Derive(0)  |  Import(23)

src/s/y/Sypy-HEAD/rlib/rgc.py   Sypy(Download)
def ll_arraycopy(source, dest, source_start, dest_start, length):
    from pypy.rpython.lltypesystem.lloperation import llop
    from pypy.rlib.objectmodel import keepalive_until_here
 
    # XXX: Hack to ensure that we get a proper effectinfo.write_descrs_arrays
    llmemory.raw_memcopy(cp_source_addr, cp_dest_addr,
                         llmemory.sizeof(TP.OF) * length)
    keepalive_until_here(source)
    keepalive_until_here(dest)
 
def ll_shrink_array(p, smallerlength):
    from pypy.rpython.lltypesystem.lloperation import llop
    from pypy.rlib.objectmodel import keepalive_until_here
                         llmemory.sizeof(ARRAY.OF) * smallerlength)
 
    keepalive_until_here(p)
    keepalive_until_here(newp)
    return newp

src/s/y/Sypy-HEAD/rpython/lltypesystem/rffi.py   Sypy(Download)
from pypy.tool.sourcetools import func_with_new_name
from pypy.rlib.objectmodel import Symbolic, CDefinedIntSymbolic
from pypy.rlib.objectmodel import keepalive_until_here
from pypy.rlib import rarithmetic, rgc
from pypy.rpython.extregistry import ExtRegistryEntry
            offsetof(STRTYPE, 'chars') + itemoffsetof(STRTYPE.chars, 0)
        followed_2nd_path = (buf == cast(TYPEP, data_start))
        keepalive_until_here(data)
        if not followed_2nd_path:
            lltype.free(buf, flavor='raw')
        raw_memcopy(src, dest,
                    llmemory.sizeof(ll_char_type) * needed_size)
        keepalive_until_here(gc_buf)
        keepalive_until_here(new_buf)
        return hlstrtype(new_buf)
        """
        if gc_buf:
            keepalive_until_here(gc_buf)
        elif raw_buf:
            lltype.free(raw_buf, flavor='raw')

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/rffi.py   plexnet(Download)
from pypy.tool.sourcetools import func_with_new_name
from pypy.rlib.objectmodel import Symbolic, CDefinedIntSymbolic
from pypy.rlib.objectmodel import keepalive_until_here
from pypy.rlib import rarithmetic, rgc
from pypy.rpython.extregistry import ExtRegistryEntry
            lltype.free(buf, flavor='raw')
        else:
            keepalive_until_here(data)
 
    # int -> (char*, str)
            return hlstrtype(new_buf)
        finally:
            keepalive_until_here(new_buf)
 
    # (char*, str) -> None
        """
        if gc_buf:
            keepalive_until_here(gc_buf)
        elif raw_buf:
            lltype.free(raw_buf, flavor='raw')

src/s/y/Sypy-HEAD/rlib/jit.py   Sypy(Download)
 
from pypy.rlib.nonconst import NonConstant
from pypy.rlib.objectmodel import CDefinedIntSymbolic, keepalive_until_here, specialize
from pypy.rlib.unroll import unrolling_iterable
from pypy.rpython.extregistry import ExtRegistryEntry
def jit_debug(string, arg1=-sys.maxint-1, arg2=-sys.maxint-1,
                      arg3=-sys.maxint-1, arg4=-sys.maxint-1):
    """When JITted, cause an extra operation JIT_DEBUG to appear in
    the graphs.  Should not be left after debugging."""
    keepalive_until_here(string) # otherwise the whole function call is removed
def assert_green(value):
    """Very strong assert: checks that 'value' is a green
    (a JIT compile-time constant)."""
    keepalive_until_here(value)
assert_green._annspecialcase_ = 'specialize:argtype(0)'
def virtual_ref_finish(vref, x):
    """See docstring in virtual_ref(x)"""
    keepalive_until_here(x)   # otherwise the whole function call is removed
    _virtual_ref_finish(vref, x)
virtual_ref_finish.oopspec = 'virtual_ref_finish(x)'

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rsocket.py   plexnet(Download)
# app-level code for PyPy.
 
from pypy.rlib.objectmodel import instantiate, keepalive_until_here
from pypy.rlib import _rsocket_rffi as _c
from pypy.rlib.rarithmetic import intmask
    def unlock(self):
        """To call after we're done with the pointer returned by lock().
        Note that locking and unlocking costs nothing at run-time.
        """
        keepalive_until_here(self)

src/s/y/Sypy-HEAD/rlib/rsocket.py   Sypy(Download)
# app-level code for PyPy.
 
from pypy.rlib.objectmodel import instantiate, keepalive_until_here
from pypy.rlib import _rsocket_rffi as _c
from pypy.rlib.rarithmetic import intmask, r_uint
    def unlock(self):
        """To call after we're done with the pointer returned by lock().
        Note that locking and unlocking costs nothing at run-time.
        """
        keepalive_until_here(self)

src/s/y/Sypy-HEAD/module/array/interp_array.py   Sypy(Download)
from pypy.rlib.rarithmetic import ovfcheck
from pypy.rlib.unroll import unrolling_iterable
from pypy.rlib.objectmodel import specialize, keepalive_until_here
from pypy.rpython.lltypesystem import lltype, rffi
 
        def _charbuf_stop(self):
            keepalive_until_here(self)
 
        def w_getitem(self, space, idx):
            item = self.buffer[idx]

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/module/zlib/interp_zlib.py   plexnet(Download)
from pypy.interpreter.error import OperationError
from pypy.rlib.rarithmetic import intmask, r_uint
from pypy.rlib.objectmodel import keepalive_until_here
 
from pypy.rlib import rzlib
    def unlock(self):
        """To call after using self.stream."""
        self._lock.release()
        keepalive_until_here(self)
        # subtle: we have to make sure that 'self' is not garbage-collected

src/s/y/Sypy-HEAD/module/zlib/interp_zlib.py   Sypy(Download)
from pypy.interpreter.error import OperationError
from pypy.rlib.rarithmetic import intmask, r_uint
from pypy.rlib.objectmodel import keepalive_until_here
 
from pypy.rlib import rzlib
    def unlock(self):
        """To call after using self.stream."""
        self._lock.release()
        keepalive_until_here(self)
        # subtle: we have to make sure that 'self' is not garbage-collected

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/module/ll_os.py   plexnet(Download)
from pypy.rpython.annlowlevel import llstr
from pypy.rlib import rgc
from pypy.rlib.objectmodel import keepalive_until_here
 
posix = __import__(os.name)

  1 | 2 | 3  Next