Did I find the right examples for you? yes no

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

src/s/y/Sypy-HEAD/jit/metainterp/virtualref.py   Sypy(Download)
            ('super', rclass.OBJECT),
            ('virtual_token', lltype.Signed),
            ('forced', rclass.OBJECTPTR))
        self.jit_virtual_ref_vtable = lltype.malloc(rclass.OBJECT_VTABLE,
                                                    zero=True, flavor='raw',
    def virtual_ref_during_tracing(self, real_object):
        assert real_object
        vref = lltype.malloc(self.JIT_VIRTUAL_REF)
        p = lltype.cast_pointer(rclass.OBJECTPTR, vref)
        p.typeptr = self.jit_virtual_ref_vtable
        vref.virtual_token = self.TOKEN_NONE
        vref.forced = lltype.cast_opaque_ptr(rclass.OBJECTPTR, real_object)
    def is_virtual_ref(self, gcref):
        if not gcref:
            return False
        inst = lltype.cast_opaque_ptr(rclass.OBJECTPTR, gcref)
        return inst.typeptr == self.jit_virtual_ref_vtable
        assert vref.virtual_token != self.TOKEN_TRACING_RESCALL
        vref.virtual_token = self.TOKEN_NONE
        vref.forced = lltype.cast_opaque_ptr(rclass.OBJECTPTR, real_object)
 
    # ____________________________________________________________

src/s/y/Sypy-HEAD/jit/metainterp/typesystem.py   Sypy(Download)
    def instanceOf(self, instbox, clsbox):
        adr = clsbox.getaddr()
        bounding_class = llmemory.cast_adr_to_ptr(adr, rclass.CLASSTYPE)
        real_instance = instbox.getref(rclass.OBJECTPTR)
        return rclass.ll_isinstance(real_instance, bounding_class)

src/s/y/Sypy-HEAD/jit/metainterp/blackhole.py   Sypy(Download)
    def bhimpl_raise(self, excvalue):
        e = lltype.cast_opaque_ptr(rclass.OBJECTPTR, excvalue)
        assert e
        reraise(e)
 
    def _resume_mainloop(self, current_exc):
        assert lltype.typeOf(current_exc) == rclass.OBJECTPTR
        try:
            # if there is a current exception, raise it now
            # (it may be caught by a catch_operation in this frame)
              opnum == rop.GUARD_EXCEPTION or
              opnum == rop.GUARD_NOT_FORCED):
            return lltype.cast_opaque_ptr(rclass.OBJECTPTR,
                                          self.cpu.grab_exc_value())
        #
    #
    if metainterp.last_exc_value_box is not None:
        current_exc = metainterp.last_exc_value_box.getref(rclass.OBJECTPTR)
    else:
        current_exc = lltype.nullptr(rclass.OBJECTPTR.TO)

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 = lltype.cast_opaque_ptr(rclass.OBJECTPTR, value)
        expected_class = llmemory.cast_adr_to_ptr(
            cast_int_to_adr(self.memocast, expected_class),
            rclass.CLASSTYPE)
    def op_new_with_vtable(self, descr, vtable):
        assert descr is None
        size = get_class_size(self.memocast, vtable)
        result = do_new(size)
        value = lltype.cast_opaque_ptr(rclass.OBJECTPTR, result)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/rvirtualizable2.py   plexnet(Download)
from pypy.rpython.rmodel import inputconst
from pypy.rpython.lltypesystem import lltype, llmemory
from pypy.rpython.lltypesystem.rclass import InstanceRepr, OBJECTPTR
from pypy.rpython.rvirtualizable2 import AbstractVirtualizable2InstanceRepr
 
VABLERTIPTR = OBJECTPTR

src/s/y/Sypy-HEAD/jit/backend/llgraph/llimpl.py   Sypy(Download)
    def op_guard_class(self, _, value, expected_class):
        value = lltype.cast_opaque_ptr(rclass.OBJECTPTR, value)
        expected_class = llmemory.cast_adr_to_ptr(
            llmemory.cast_int_to_adr(expected_class),
            rclass.CLASSTYPE)
    def op_new_with_vtable(self, descr, vtable):
        assert descr is None
        descr = heaptracker.vtable2descr(self.cpu, vtable)
        result = do_new(descr.ofs)
        value = lltype.cast_opaque_ptr(rclass.OBJECTPTR, result)

src/s/y/Sypy-HEAD/rpython/lltypesystem/rvirtualizable2.py   Sypy(Download)
from pypy.rpython.rmodel import inputconst
from pypy.rpython.lltypesystem import lltype, llmemory
from pypy.rpython.lltypesystem.rclass import InstanceRepr, OBJECTPTR
from pypy.rpython.rvirtualizable2 import AbstractVirtualizable2InstanceRepr
 

src/s/y/Sypy-HEAD/jit/metainterp/quasiimmut.py   Sypy(Download)
def do_force_quasi_immutable(cpu, p, mutatefielddescr):
    qmut_ref = cpu.bh_getfield_gc_r(p, mutatefielddescr)
    if qmut_ref:
        cpu.bh_setfield_gc_r(p, mutatefielddescr, cpu.ts.NULLREF)
        qmut_ptr = lltype.cast_opaque_ptr(rclass.OBJECTPTR, qmut_ref)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rlib/rweakrefimpl.py   plexnet(Download)
                llvalue = r_value.convert_const(dictvalue)
                if llvalue:
                    llvalue = lltype.cast_pointer(rclass.OBJECTPTR, llvalue)
                    ll_set_nonnull(l_dict, llkey, llvalue)
            return l_dict
        else:
            v_value = hop.genop("cast_pointer", [v_value],
                                resulttype=rclass.OBJECTPTR)
            hop.gendirectcall(ll_set, v_d, v_key, v_value)
 
def ll_valid(entries, i):
    return (bool(entries[i].value) and
            bool(weakref_deref(rclass.OBJECTPTR, entries[i].value)))
 
def ll_everused(entries, i):
    valueref = d.entries[i].value
    if valueref:
        return weakref_deref(rclass.OBJECTPTR, valueref)
    else:
        return lltype.nullptr(rclass.OBJECTPTR.TO)

src/s/y/Sypy-HEAD/jit/backend/llsupport/llmodel.py   Sypy(Download)
    def bh_classof(self, struct):
        struct = lltype.cast_opaque_ptr(rclass.OBJECTPTR, struct)
        result_adr = llmemory.cast_ptr_to_adr(struct.typeptr)
        return heaptracker.adr2int(result_adr)
 

  1 | 2 | 3  Next