Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/cli/test/test_dotnet.py   plexnet(Download)
import py
from pypy.annotation.annrpython import RPythonAnnotator
from pypy.annotation import model as annmodel
from pypy.rpython.ootypesystem import ootype
from pypy.rpython.ootypesystem.ootype import meth, Meth, Char, Signed, Float, String,\
    def test_overloaded_meth_string(self):
        C = Instance("test", ROOT, {},
                     {'foo': overload(meth(Meth([Char], Signed)),
                                      meth(Meth([String], Float)),
                                      resolver=OverloadingResolver),
    def test_box_unbox_ooinstance(self):
        A = ootype.Instance('A', ootype.ROOT, {'xx': ootype.Signed})
        def fn(flag):
            a = ootype.new(A)
            a.xx = 42
            b_obj = box(a)
            a2 = unbox(b_obj, A)

src/s/y/Sypy-HEAD/translator/cli/test/test_dotnet.py   Sypy(Download)
import py
from pypy.annotation.annrpython import RPythonAnnotator
from pypy.annotation import model as annmodel
from pypy.rpython.ootypesystem import ootype
from pypy.rpython.ootypesystem.ootype import meth, Meth, Char, Signed, Float, String,\
    def test_overloaded_meth_string(self):
        C = Instance("test", ROOT, {},
                     {'foo': overload(meth(Meth([Char], Signed)),
                                      meth(Meth([String], Float)),
                                      resolver=OverloadingResolver),
    def test_box_unbox_ooinstance(self):
        A = ootype.Instance('A', ootype.ROOT, {'xx': ootype.Signed})
        def fn(flag):
            a = ootype.new(A)
            a.xx = 42
            b_obj = box(a)
            a2 = unbox(b_obj, A)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/test/test_optimizefindnode.py   plexnet(Download)
 
    cpu = runner.OOtypeCPU(None)
    NODE = ootype.Instance('NODE', ootype.ROOT, {})
    NODE._add_fields({'value': ootype.Signed,
                      'floatval' : ootype.Float,
                      'next': NODE})
    NODE2 = ootype.Instance('NODE2', NODE, {'other': NODE})

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/runner_test.py   plexnet(Download)
        return BoxObj(ootype.cast_to_object(func_ptr))
 
    S = ootype.Instance('S', ootype.ROOT, {'value': ootype.Signed,
                                           'chr1': ootype.Char,
                                           'chr2': ootype.Char})
    S._add_fields({'next': S})
    T = ootype.Instance('T', S)
    U = ootype.Instance('U', T)

src/s/y/Sypy-HEAD/jit/backend/test/runner_test.py   Sypy(Download)
        return BoxObj(ootype.cast_to_object(func_ptr))
 
    S = ootype.Instance('S', ootype.ROOT, {'value': ootype.Signed,
                                           'chr1': ootype.Char,
                                           'chr2': ootype.Char})
    S._add_fields({'next': S})
    T = ootype.Instance('T', S)
    U = ootype.Instance('U', T)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/test/test_basic.py   plexnet(Download)
    def GcStruct(name, *fields, **kwds):
        if 'hints' in kwds:
            kwds['_hints'] = kwds['hints']
            del kwds['hints']
        I = ootype.Instance(name, ootype.ROOT, dict(fields), **kwds)
        return I
    def _get_NODE(self):
        NODE = ootype.Instance('NODE', ootype.ROOT, {})
        NODE._add_fields({'value': ootype.Signed,
                          'next': NODE})
        return NODE

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/backendopt/test/test_checkvirtual.py   plexnet(Download)
from pypy.rpython.ootypesystem.ootype import ROOT, Instance, \
     addMethods, meth, Meth, Void
from pypy.translator.backendopt.checkvirtual import check_virtual_methods
 
def test_nonvirtual():
    A = Instance("A", ROOT)
    addMethods(A, {"foo": meth(Meth([], Void))})
def test_checkvirtual_simple():
    A = Instance("A", ROOT)
    B = Instance("B", A)
 
    addMethods(A, {"foo": meth(Meth([], Void)),

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/test/test_rclass.py   plexnet(Download)
    def test_cast_object_instance(self):
        A = ootype.Instance("Foo", ootype.ROOT)
 
        def fn_instance():
            a = ootype.new(A)
            obj = ootype.cast_to_object(a)
            a2 = ootype.cast_from_object(A, obj)
    def test_cast_object_null(self):
        A = ootype.Instance("Foo", ootype.ROOT)
        B = ootype.Record({'x': ootype.Signed}) 
 
        def fn_null():
            a = ootype.null(A)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/translator/oosupport/test_template/constant.py   plexnet(Download)
    def test_unwrap_object(self):
        A = ootype.Instance("A", ootype.ROOT, {})
        a1 = ootype.new(A)
        a2 = ootype.new(A)
        obj1 = ootype.cast_to_object(a1)
            else:
                obj = obj2
            a3 = ootype.cast_from_object(A, obj)
            return a3 is a1
        res = self.interpret(fn, [True], backendopt=False)

src/s/y/Sypy-HEAD/translator/backendopt/test/test_checkvirtual.py   Sypy(Download)
from pypy.rpython.ootypesystem.ootype import ROOT, Instance, \
     addMethods, meth, Meth, Void
from pypy.translator.backendopt.checkvirtual import check_virtual_methods
 
def test_nonvirtual():
    A = Instance("A", ROOT)
    addMethods(A, {"foo": meth(Meth([], Void))})
def test_checkvirtual_simple():
    A = Instance("A", ROOT)
    B = Instance("B", A)
 
    addMethods(A, {"foo": meth(Meth([], Void)),

  1 | 2 | 3  Next