Did I find the right examples for you? yes no

All Samples(102)  |  Call(81)  |  Derive(0)  |  Import(21)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/unaryop.py   plexnet(Download)
from pypy.annotation.model import SomePtr, SomeLLADTMeth
from pypy.annotation.model import SomeOOInstance, SomeOOBoundMeth, SomeOOStaticMeth
from pypy.annotation.model import ll_to_annotation, lltype_to_annotation, annotation_to_lltype
 
class __extend__(SomePtr):
    def call(adtmeth, args):
        bookkeeper = getbookkeeper()
        s_func = bookkeeper.immutablevalue(adtmeth.func)
        return s_func.call(args.prepend(lltype_to_annotation(adtmeth.ll_ptrtype)))
 
        else:
            METH = ootype.typeOf(meth)
            return lltype_to_annotation(METH.RESULT)
 
    def call(m, args):
        _, meth = ootype.typeOf(inst)._lookup(m.name)
        METH = ootype.typeOf(meth)
        return lltype_to_annotation(METH.RESULT)
 
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/builtin.py   plexnet(Download)
from pypy.annotation.model import SomeWeakRef
from pypy.annotation.model import SomeOOObject
from pypy.annotation.model import annotation_to_lltype, lltype_to_annotation, ll_to_annotation
from pypy.annotation.model import add_knowntypedata
from pypy.annotation.model import s_ImpossibleValue
    rresult = r_func.rtyper.getrepr(s_ret)
 
    return lltype_to_annotation(rresult.lowleveltype)
 
def robjmodel_keepalive_until_here(*args_s):
def null(I_OR_SM):
    assert I_OR_SM.is_constant()
    null = ootype.null(I_OR_SM.const)
    r = lltype_to_annotation(ootype.typeOf(null))
    return r

src/s/y/Sypy-HEAD/annotation/unaryop.py   Sypy(Download)
from pypy.annotation.model import SomePtr, SomeLLADTMeth
from pypy.annotation.model import SomeOOInstance, SomeOOBoundMeth, SomeOOStaticMeth
from pypy.annotation.model import ll_to_annotation, lltype_to_annotation, annotation_to_lltype
 
class __extend__(SomePtr):
    def call(adtmeth, args):
        bookkeeper = getbookkeeper()
        s_func = bookkeeper.immutablevalue(adtmeth.func)
        return s_func.call(args.prepend(lltype_to_annotation(adtmeth.ll_ptrtype)))
 
        else:
            METH = ootype.typeOf(meth)
            return lltype_to_annotation(METH.RESULT)
 
    def call(m, args):
        _, meth = ootype.typeOf(inst)._lookup(m.name)
        METH = ootype.typeOf(meth)
        return lltype_to_annotation(METH.RESULT)
 
 

src/s/y/Sypy-HEAD/annotation/builtin.py   Sypy(Download)
from pypy.annotation.model import SomeWeakRef, SomeIterator
from pypy.annotation.model import SomeOOObject
from pypy.annotation.model import annotation_to_lltype, lltype_to_annotation, ll_to_annotation
from pypy.annotation.model import add_knowntypedata
from pypy.annotation.model import s_ImpossibleValue
    rresult = r_func.rtyper.getrepr(s_ret)
 
    return lltype_to_annotation(rresult.lowleveltype)
 
def robjmodel_keepalive_until_here(*args_s):
def null(I_OR_SM):
    assert I_OR_SM.is_constant()
    null = ootype.null(I_OR_SM.const)
    r = lltype_to_annotation(ootype.typeOf(null))
    return r

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/signature.py   plexnet(Download)
 
import types
from pypy.annotation.model import SomeBool, SomeInteger, SomeString,\
     SomeFloat, SomeList, SomeDict, s_None, \
     SomeObject, SomeInstance, SomeTuple, lltype_to_annotation,\
        return t
    elif isinstance(t, lltype.LowLevelType):
        return lltype_to_annotation(t)
    elif isinstance(t, list):
        assert len(t) == 1, "We do not support type joining in list"

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/bookkeeper.py   plexnet(Download)
 
from pypy.objspace.flow.model import Constant
from pypy.annotation.model import SomeString, SomeChar, SomeFloat, \
     SomePtr, unionof, SomeInstance, SomeDict, SomeBuiltin, SomePBC, \
     SomeInteger, SomeOOInstance, SomeOOObject, TLS, SomeAddress, \
            adtmeth = s_callable
            s_callable = self.immutablevalue(adtmeth.func)
            args_s = [lltype_to_annotation(adtmeth.ll_ptrtype)] + args_s
        if isinstance(s_callable, SomePBC):
            s_result = binding(call_op.result, s_ImpossibleValue)

src/s/y/Sypy-HEAD/annotation/signature.py   Sypy(Download)
 
import types
from pypy.annotation.model import SomeBool, SomeInteger, SomeString,\
     SomeFloat, SomeList, SomeDict, s_None, \
     SomeObject, SomeInstance, SomeTuple, lltype_to_annotation,\
        return t
    elif isinstance(t, lltype.LowLevelType):
        return lltype_to_annotation(t)
    elif isinstance(t, list):
        assert len(t) == 1, "We do not support type joining in list"

src/s/y/Sypy-HEAD/annotation/bookkeeper.py   Sypy(Download)
 
from pypy.objspace.flow.model import Constant
from pypy.annotation.model import SomeString, SomeChar, SomeFloat, \
     SomePtr, unionof, SomeInstance, SomeDict, SomeBuiltin, SomePBC, \
     SomeInteger, SomeOOInstance, SomeOOObject, TLS, SomeAddress, \
            adtmeth = s_callable
            s_callable = self.immutablevalue(adtmeth.func)
            args_s = [lltype_to_annotation(adtmeth.ll_ptrtype)] + args_s
        if isinstance(s_callable, SomePBC):
            s_result = binding(call_op.result, s_ImpossibleValue)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/annlowlevel.py   plexnet(Download)
    def specialize__genconst(pol, funcdesc, args_s, i):
        # XXX this is specific to the JIT
        TYPE = annmodel.annotation_to_lltype(args_s[i], 'genconst')
        args_s[i] = annmodel.lltype_to_annotation(TYPE)
        alt_name = funcdesc.name + "__%s" % (TYPE._short_name(),)
            resultcls = annmodel.SomePtr
 
        args_s = [annmodel.lltype_to_annotation(T) for T in FUNC.ARGS]
        key = (llhelper, s_callable.const)
        s_res = self.bookkeeper.emulate_pbc_call(key, s_callable, args_s)
        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:
                return annmodel.lltype_to_annotation(lltype.Ptr(UNICODE))
        def compute_result_annotation(self, s_str):
            if strtype is str:
                return annmodel.lltype_to_annotation(ootype.String)
            else:
                return annmodel.lltype_to_annotation(ootype.Unicode)

src/s/y/Sypy-HEAD/rpython/annlowlevel.py   Sypy(Download)
    def specialize__genconst(pol, funcdesc, args_s, i):
        # XXX this is specific to the JIT
        TYPE = annmodel.annotation_to_lltype(args_s[i], 'genconst')
        args_s[i] = annmodel.lltype_to_annotation(TYPE)
        alt_name = funcdesc.name + "__%s" % (TYPE._short_name(),)
            resultcls = annmodel.SomePtr
 
        args_s = [annmodel.lltype_to_annotation(T) for T in FUNC.ARGS]
        key = (llhelper, s_callable.const)
        s_res = self.bookkeeper.emulate_pbc_call(key, s_callable, args_s)
        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:
                return annmodel.lltype_to_annotation(lltype.Ptr(UNICODE))
        def compute_result_annotation(self, s_str):
            if strtype is str:
                return annmodel.lltype_to_annotation(ootype.String)
            else:
                return annmodel.lltype_to_annotation(ootype.Unicode)

  1 | 2 | 3 | 4 | 5  Next