Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/llimpl.py   plexnet(Download)
    def op_guard_class(self, _, value, expected_class):
        value = ootype.cast_from_object(ootype.ROOT, value)
        expected_class = ootype.cast_from_object(ootype.Class, expected_class)
        if ootype.classof(value) is not expected_class:
            raise GuardFailed
    def op_instanceof(self, typedescr, obj):
        inst = ootype.cast_from_object(ootype.ROOT, obj)
        return ootype.instanceof(inst, typedescr.TYPE)
 
    def op_subclassof(self, _, obj1, obj2):

src/s/y/Sypy-HEAD/jit/backend/llgraph/llimpl.py   Sypy(Download)
    def op_guard_class(self, _, value, expected_class):
        value = ootype.cast_from_object(ootype.ROOT, value)
        expected_class = ootype.cast_from_object(ootype.Class, expected_class)
        if ootype.classof(value) is not expected_class:
            raise GuardFailed
    def op_instanceof(self, typedescr, obj):
        inst = ootype.cast_from_object(ootype.ROOT, obj)
        return ootype.instanceof(inst, typedescr.TYPE)
 
    def op_subclassof(self, _, obj1, obj2):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/cli/runner.py   plexnet(Download)
    def get_exception(self):
        exc_value = self.get_inputargs().get_exc_value()
        if exc_value:
            exc_obj = dotnet.cast_from_native_object(exc_value)
            exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
        def instanceof(box):
            if isinstance(TYPE, ootype.Instance):
                obj = box.getref(ootype.ROOT)
                return BoxInt(ootype.instanceof(obj, TYPE))
            return None

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/typesystem.py   plexnet(Download)
    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 get_exception_obj(self, evaluebox):
        # only works when translated
        obj = evaluebox.getref(ootype.ROOT)
        return cast_base_ptr_to_instance(Exception, obj)
 
    def cast_to_baseclass(self, value):
        return ootype.cast_from_object(ootype.ROOT, value)

src/s/y/Sypy-HEAD/jit/backend/cli/runner.py   Sypy(Download)
    def get_exception(self):
        exc_value = self.get_inputargs().get_exc_value()
        if exc_value:
            exc_obj = dotnet.cast_from_native_object(exc_value)
            exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
        def instanceof(box):
            if isinstance(TYPE, ootype.Instance):
                obj = box.getref(ootype.ROOT)
                return BoxInt(ootype.instanceof(obj, TYPE))
            return None

src/s/y/Sypy-HEAD/jit/metainterp/typesystem.py   Sypy(Download)
    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 get_exception_obj(self, evaluebox):
        # only works when translated
        obj = evaluebox.getref(ootype.ROOT)
        return cast_base_ptr_to_instance(Exception, obj)
 
    def cast_to_baseclass(self, value):
        return ootype.cast_from_object(ootype.ROOT, value)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/runner.py   plexnet(Download)
        def instanceof(box):
            obj = box.getref(ootype.ROOT)
            return history.BoxInt(ootype.instanceof(obj, TYPE))
 
        self.create = create

src/s/y/Sypy-HEAD/jit/backend/llgraph/runner.py   Sypy(Download)
        def instanceof(box):
            obj = box.getref(ootype.ROOT)
            return history.BoxInt(ootype.instanceof(obj, TYPE))
 
        self.create = create

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/ootypesystem/rbuiltin.py   plexnet(Download)
        class_repr = rclass.get_type_repr(hop.rtyper)
        v_cls = hop.inputarg(class_repr, arg=0)
        v_obj = hop.genop('runtimenew', [v_cls], resulttype=ootype.ROOT)
        v_instance = hop.genop('oodowncast', [v_obj], resulttype=hop.r_result.lowleveltype)
        return v_instance

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/rweakref.py   plexnet(Download)
        else:
            v_deref = hop.genop('oosend', [cname, v_wref],
                                resulttype=ootype.ROOT)
            return hop.genop('oodowncast', [v_deref], resulttype=hop.r_result)
 

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