Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/cli/runner.py   plexnet(Download)
    def typedescr2classbox(self, descr):
        assert isinstance(descr, TypeDescr)
        return ConstObj(ootype.cast_to_object(descr.ooclass))
 
    # ----------------------
            exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
            cls = ootype.classof(exc_value)
            return ootype.cast_to_object(cls)
        return ootype.cast_to_object(ootype.nullruntimeclass)
 
    def get_overflow_error(self):
        exc_type = ootype.cast_to_object(ootype.classof(self.ll_ovf_exc))
        exc_value = ootype.cast_to_object(self.ll_ovf_exc)
        return exc_type, exc_value
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/llimpl.py   plexnet(Download)
    def as_object(self, x):
        return ootype.cast_to_object(x)
 
    def as_float(self, x):
        return cast_to_float(x)
                            boxedargs.append(BoxFloat(x))
                        elif isinstance(ootype.typeOf(x), ootype.OOType):
                            boxedargs.append(BoxObj(ootype.cast_to_object(x)))
                        else:
                            boxedargs.append(BoxPtr(x))
    def op_new_with_vtable(self, descr, vtable):
        assert descr is None
        typedescr = get_class_size(self.memocast, vtable)
        return ootype.cast_to_object(ootype.new(typedescr.TYPE))
 
    def op_new_array(self, typedescr, count):
        res = ootype.oonewarray(typedescr.ARRAY, count)
        return ootype.cast_to_object(res)
        res = getattr(obj, fieldname)
        if isinstance(T, ootype.OOType):
            return ootype.cast_to_object(res)
        return res
 

src/s/y/Sypy-HEAD/jit/backend/cli/runner.py   Sypy(Download)
    def typedescr2classbox(self, descr):
        assert isinstance(descr, TypeDescr)
        return ConstObj(ootype.cast_to_object(descr.ooclass))
 
    # ----------------------
            exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
            cls = ootype.classof(exc_value)
            return ootype.cast_to_object(cls)
        return ootype.cast_to_object(ootype.nullruntimeclass)
 
    def get_overflow_error(self):
        exc_type = ootype.cast_to_object(ootype.classof(self.ll_ovf_exc))
        exc_value = ootype.cast_to_object(self.ll_ovf_exc)
        return exc_type, exc_value
 

src/s/y/Sypy-HEAD/jit/backend/llgraph/llimpl.py   Sypy(Download)
    def as_object(self, x):
        return ootype.cast_to_object(x)
 
    def as_floatstorage(self, x):
        return cast_to_floatstorage(x)
    def op_new_with_vtable(self, descr, vtable):
        assert descr is None
        typedescr = get_class_size(self.memocast, vtable)
        return ootype.cast_to_object(ootype.new(typedescr.TYPE))
 
    def op_new_array(self, typedescr, count):
        res = ootype.oonewarray(typedescr.ARRAY, count)
        return ootype.cast_to_object(res)
        res = getattr(obj, fieldname)
        if isinstance(T, ootype.OOType):
            return ootype.cast_to_object(res)
        return res
 
    def op_getarrayitem_gc(self, typedescr, obj, index):
        array = ootype.cast_from_object(typedescr.ARRAY, obj)
        res = array.ll_getitem_fast(index)
        if isinstance(typedescr.TYPE, ootype.OOType):
            return ootype.cast_to_object(res)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/runner.py   plexnet(Download)
    def typedescr2classbox(self, descr):
        assert isinstance(descr, TypeDescr)
        return history.ConstObj(ootype.cast_to_object(
                            ootype.runtimeClass(descr.TYPE)))
 
    def get_exception(self):
        if llimpl._last_exception:
            e = llimpl._last_exception.args[0]
            return ootype.cast_to_object(e)
    def get_exc_value(self):
        if llimpl._last_exception:
            earg = llimpl._last_exception.args[1]
            return ootype.cast_to_object(earg)
        else:
            return ootype.NULL
 
    def get_overflow_error(self):
        ll_err = llimpl._get_error(OverflowError)
        return (ootype.cast_to_object(ll_err.args[0]),
    def get_overflow_error(self):
        ll_err = llimpl._get_error(OverflowError)
        return (ootype.cast_to_object(ll_err.args[0]),
                ootype.cast_to_object(ll_err.args[1]))
 

src/s/y/Sypy-HEAD/jit/backend/llgraph/runner.py   Sypy(Download)
    def typedescr2classbox(self, descr):
        assert isinstance(descr, TypeDescr)
        return history.ConstObj(ootype.cast_to_object(
                            ootype.runtimeClass(descr.TYPE)))
 
    def get_exception(self):
        if llimpl._last_exception:
            e = llimpl._last_exception.args[0]
            return ootype.cast_to_object(e)
    def get_exc_value(self):
        if llimpl._last_exception:
            earg = llimpl._last_exception.args[1]
            return ootype.cast_to_object(earg)
        else:
            return ootype.NULL
 
    def get_overflow_error(self):
        ll_err = llimpl._get_error(OverflowError)
        return (ootype.cast_to_object(ll_err.args[0]),
    def get_overflow_error(self):
        ll_err = llimpl._get_error(OverflowError)
        return (ootype.cast_to_object(ll_err.args[0]),
                ootype.cast_to_object(ll_err.args[1]))
 

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/typesystem.py   plexnet(Download)
    def new_ConstRef(self, x):
        obj = ootype.cast_to_object(x)
        return history.ConstObj(obj)
 
    def get_typeptr(self, obj):
    def cast_fnptr_to_root(self, fnptr):
        return ootype.cast_to_object(fnptr)
 
    def cls_of_box(self, cpu, box):
        obj = box.getref(ootype.ROOT)
        oocls = ootype.classof(obj)
        return history.ConstObj(ootype.cast_to_object(oocls))
    def conststr(self, str):
        oo = oostr(str)
        return history.ConstObj(ootype.cast_to_object(oo))
 
    # A dict whose keys are refs (like the .value of BoxObj).
    def cast_vtable_to_hashable(self, cpu, obj):
        return ootype.cast_to_object(obj)
 
    def cast_from_ref(self, TYPE, value):
        return ootype.cast_from_object(TYPE, value)

src/s/y/Sypy-HEAD/jit/metainterp/typesystem.py   Sypy(Download)
    def new_ConstRef(self, x):
        obj = ootype.cast_to_object(x)
        return history.ConstObj(obj)
 
    def get_typeptr(self, obj):
    def cast_fnptr_to_root(self, fnptr):
        return ootype.cast_to_object(fnptr)
 
    def cls_of_box(self, cpu, box):
        obj = box.getref(ootype.ROOT)
        oocls = ootype.classof(obj)
        return history.ConstObj(ootype.cast_to_object(oocls))
    def conststr(self, str):
        oo = oostr(str)
        return history.ConstObj(ootype.cast_to_object(oo))
 
    # A dict whose keys are refs (like the .value of BoxObj).
    def cast_vtable_to_hashable(self, cpu, obj):
        return ootype.cast_to_object(obj)
 
    def cast_from_ref(self, TYPE, value):
        return ootype.cast_from_object(TYPE, value)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/ootypesystem/ooopimpl.py   plexnet(Download)
def op_cast_to_object(inst):
    return ootype.cast_to_object(inst)
 
def op_cast_from_object(TYPE, obj):
    return ootype.cast_from_object(TYPE, obj)

src/s/y/Sypy-HEAD/rpython/ootypesystem/ooopimpl.py   Sypy(Download)
def op_cast_to_object(inst):
    return ootype.cast_to_object(inst)
 
def op_cast_from_object(TYPE, obj):
    return ootype.cast_from_object(TYPE, obj)

  1 | 2 | 3  Next