Did I find the right examples for you? yes no

All Samples(48)  |  Call(40)  |  Derive(2)  |  Import(6)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/ootypesystem/ooregistry.py   plexnet(Download)
                                  annmodel.SomeString))
        assert isinstance(base_s, annmodel.SomeInteger)
        return annmodel.SomeOOInstance(ootype.String)
 
    def specialize_call(self, hop):
                and obj_s.ootype in (ootype.String, ootype.Unicode))
        assert isinstance(base_s, annmodel.SomeInteger)
        return annmodel.SomeOOInstance(ootype.Unicode)
 
    def specialize_call(self, hop):
    def compute_annotation(self):
        return annmodel.SomeOOInstance(ootype=ootype.String)
 
 
class Entry_ooparse_int(ExtRegistryEntry):

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, \
            result = SomeOOClass(x._INSTANCE)   # NB. can be None
        elif isinstance(x, ootype.instance_impl): # XXX
            result = SomeOOInstance(ootype.typeOf(x))
        elif isinstance(x, (ootype._record, ootype._string)):
            result = SomeOOInstance(ootype.typeOf(x))

src/s/y/Sypy-HEAD/rpython/ootypesystem/ooregistry.py   Sypy(Download)
                                  annmodel.SomeString))
        assert isinstance(base_s, annmodel.SomeInteger)
        return annmodel.SomeOOInstance(ootype.String)
 
    def specialize_call(self, hop):
                and obj_s.ootype in (ootype.String, ootype.Unicode))
        assert isinstance(base_s, annmodel.SomeInteger)
        return annmodel.SomeOOInstance(ootype.Unicode)
 
    def specialize_call(self, hop):
    def compute_annotation(self):
        return annmodel.SomeOOInstance(ootype=ootype.String)
 
 
class Entry_ooparse_int(ExtRegistryEntry):

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, \
            result = SomeOOClass(x._INSTANCE)   # NB. can be None
        elif isinstance(x, ootype.instance_impl): # XXX
            result = SomeOOInstance(ootype.typeOf(x))
        elif isinstance(x, (ootype._record, ootype._string)):
            result = SomeOOInstance(ootype.typeOf(x))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/builtin.py   plexnet(Download)
 
# ootype
from pypy.annotation.model import SomeOOInstance, SomeOOClass, SomeOOStaticMeth
from pypy.rpython.ootypesystem import ootype
 
def new(I):
    assert I.is_constant()
    i = ootype.new(I.const)
    r = SomeOOInstance(ootype.typeOf(i))
def oonewarray(s_type, length):
    assert s_type.is_constant()
    return SomeOOInstance(s_type.const)
 
def null(I_OR_SM):
        return s_ImpossibleValue   # can't call runtimenew(NULL)
    else:
        return SomeOOInstance(c.ootype)
 
def ooupcast(I, i):
    assert isinstance(I.const, ootype.Instance)
    if ootype.isSubclass(i.ootype, I.const):
        return SomeOOInstance(I.const)

src/s/y/Sypy-HEAD/annotation/builtin.py   Sypy(Download)
 
# ootype
from pypy.annotation.model import SomeOOInstance, SomeOOClass, SomeOOStaticMeth
from pypy.rpython.ootypesystem import ootype
 
def new(I):
    assert I.is_constant()
    i = ootype.new(I.const)
    r = SomeOOInstance(ootype.typeOf(i))
def oonewarray(s_type, length):
    assert s_type.is_constant()
    return SomeOOInstance(s_type.const)
 
def null(I_OR_SM):
        return s_ImpossibleValue   # can't call runtimenew(NULL)
    else:
        return SomeOOInstance(c.ootype)
 
def ooupcast(I, i):
    assert isinstance(I.const, ootype.Instance)
    if ootype.isSubclass(i.ootype, I.const):
        return SomeOOInstance(I.const)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/annlowlevel.py   plexnet(Download)
            return annmodel.SomePtr(s_PTR.const)
        elif isinstance(s_PTR.const, ootype.Instance):
            return annmodel.SomeOOInstance(s_PTR.const)
        else:
            assert False

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/annotation/unaryop.py   plexnet(Download)
# annotation of low-level types
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__(SomeOOInstance):
    def getattr(r, s_attr):
        assert s_attr.is_constant(), "getattr on ref %r with non-constant field-name" % r.ootype
        v = getattr(r.ootype._example(), s_attr.const)
        if isinstance(v, ootype._bound_meth):

src/s/y/Sypy-HEAD/rpython/annlowlevel.py   Sypy(Download)
            return annmodel.SomePtr(s_PTR.const)
        elif isinstance(s_PTR.const, ootype.Instance):
            return annmodel.SomeOOInstance(s_PTR.const)
        else:
            assert False

src/s/y/Sypy-HEAD/annotation/unaryop.py   Sypy(Download)
# annotation of low-level types
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__(SomeOOInstance):
    def getattr(r, s_attr):
        assert s_attr.is_constant(), "getattr on ref %r with non-constant field-name" % r.ootype
        v = getattr(r.ootype._example(), s_attr.const)
        if isinstance(v, ootype._bound_meth):

  1 | 2  Next