Did I find the right examples for you? yes no

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

src/s/y/Sypy-HEAD/jit/backend/llgraph/llimpl.py   Sypy(Download)
def do_strlen(string):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
    return len(str.chars)
 
def do_strgetitem(string, index):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
def do_strsetitem(string, index, newvalue):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
    str.chars[index] = chr(newvalue)
 
def do_unicodesetitem(string, index, newvalue):
    uni = lltype.cast_opaque_ptr(lltype.Ptr(rstr.UNICODE), string)
    uni.chars[index] = unichr(newvalue)
 
def do_copystrcontent(src, dst, srcstart, dststart, length):
    src = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), src)
def do_copystrcontent(src, dst, srcstart, dststart, length):
    src = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), src)
    dst = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), dst)
    assert 0 <= srcstart <= srcstart + length <= len(src.chars)
    assert 0 <= dststart <= dststart + length <= len(dst.chars)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/rbuilder.py   plexnet(Download)
 
from pypy.rpython.rbuilder import AbstractStringBuilderRepr
from pypy.rpython.lltypesystem import lltype
from pypy.rpython.lltypesystem.rstr import STR, UNICODE, char_repr,\
     string_repr, unichar_repr, unicode_repr
                              ('allocated', lltype.Signed),
                              ('used', lltype.Signed),
                              ('buf', lltype.Ptr(STR)),
                                adtmeths={'grow':staticAdtMethod(stringbuilder_grow)})
 
class StringBuilderRepr(BaseStringBuilderRepr):
    lowleveltype = lltype.Ptr(STRINGBUILDER)
    basetp = STR
    string_repr = string_repr
    char_repr = char_repr

src/s/y/Sypy-HEAD/jit/backend/llsupport/llmodel.py   Sypy(Download)
    def bh_strlen(self, string):
        s = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
        return len(s.chars)
 
    def bh_unicodelen(self, string):
        u = lltype.cast_opaque_ptr(lltype.Ptr(rstr.UNICODE), string)
        return len(u.chars)
 
    def bh_strgetitem(self, string, index):
        s = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
    def bh_strsetitem(self, string, index, newvalue):
        s = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
        s.chars[index] = chr(newvalue)
 
    def bh_unicodesetitem(self, string, index, newvalue):
        u = lltype.cast_opaque_ptr(lltype.Ptr(rstr.UNICODE), string)
        u.chars[index] = unichr(newvalue)
 
    def bh_copystrcontent(self, src, dst, srcstart, dststart, length):
        src = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), src)
    def bh_copystrcontent(self, src, dst, srcstart, dststart, length):
        src = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), src)
        dst = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), dst)
        rstr.copy_string_contents(src, dst, srcstart, dststart, length)
 

src/s/y/Sypy-HEAD/rpython/lltypesystem/rbuilder.py   Sypy(Download)
from pypy.rpython.lltypesystem import lltype, rstr
from pypy.rpython.lltypesystem.lltype import staticAdtMethod, nullptr
from pypy.rpython.lltypesystem.rstr import (STR, UNICODE, char_repr,
    string_repr, unichar_repr, unicode_repr)
from pypy.rpython.rbuilder import AbstractStringBuilderRepr
                               ('allocated', lltype.Signed),
                               ('used', lltype.Signed),
                               ('buf', lltype.Ptr(STR)),
                               adtmeths={'grow':staticAdtMethod(stringbuilder_grow)})
 
class StringBuilderRepr(BaseStringBuilderRepr):
    lowleveltype = lltype.Ptr(STRINGBUILDER)
    basetp = STR
    mallocfn = staticmethod(rstr.mallocstr)
    string_repr = string_repr

src/s/y/Sypy-HEAD/rpython/annlowlevel.py   Sypy(Download)
    def llstr(s):
        from pypy.rpython.lltypesystem.rstr import mallocstr, mallocunicode
        from pypy.rpython.lltypesystem.rstr import STR, UNICODE
        if strtype is str:
            if s is None:
                return lltype.nullptr(STR)
        def compute_result_annotation(self, s_str):
            from pypy.rpython.lltypesystem.rstr import STR, UNICODE
            if strtype is str:
                return annmodel.lltype_to_annotation(lltype.Ptr(STR))
            else:

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/module/support.py   plexnet(Download)
    def to_rstr(s):
        from pypy.rpython.lltypesystem.rstr import STR, mallocstr
        if s is None:
            return lltype.nullptr(STR)
        p = mallocstr(len(s))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/annlowlevel.py   plexnet(Download)
        def compute_result_annotation(self, s_str):
            from pypy.rpython.lltypesystem.rstr import STR, UNICODE
            if strtype is str:
                return annmodel.lltype_to_annotation(lltype.Ptr(STR))
            else:

src/s/y/Sypy-HEAD/rpython/module/support.py   Sypy(Download)
    def to_rstr(s):
        from pypy.rpython.lltypesystem.rstr import STR, mallocstr
        if s is None:
            return lltype.nullptr(STR)
        p = mallocstr(len(s))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/llimpl.py   plexnet(Download)
def do_strlen(_, string):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
    return len(str.chars)
 
def do_strgetitem(_, string, index):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
def do_strsetitem(_, string, index, newvalue):
    str = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), string)
    str.chars[index] = chr(newvalue)
 
def do_unicodesetitem(_, string, index, newvalue):

src/s/y/Sypy-HEAD/jit/metainterp/executor.py   Sypy(Download)
def do_copystrcontent(cpu, _, srcbox, dstbox,
                      srcstartbox, dststartbox, lengthbox):
    src = srcbox.getref(lltype.Ptr(rstr.STR))
    dst = dstbox.getref(lltype.Ptr(rstr.STR))
    srcstart = srcstartbox.getint()

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