Did I find the right examples for you? yes no

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

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/rpython/lltypesystem/rtagged.py   plexnet(Download)
from pypy.objspace.flow.model import Constant
from pypy.rpython.rclass import getclassrepr, getinstancerepr, get_type_repr
from pypy.rpython.lltypesystem import lltype
from pypy.rpython.lltypesystem.rclass import InstanceRepr, CLASSTYPE, ll_inst_type
from pypy.rpython.lltypesystem.rclass import MissingRTypeAttribute
    def gettype_from_unboxed(self, llops, vinst, can_be_none=False):
        unboxedclass_repr = getclassrepr(self.rtyper, self.unboxedclassdef)
        cunboxedcls = inputconst(CLASSTYPE, unboxedclass_repr.getvtable())
        if self.is_parent:
            # If the lltype of vinst shows that it cannot be a tagged value,
                ctypeptr = inputconst(lltype.Void, 'typeptr')
                return llops.genop('getfield', [vinst, ctypeptr],
                                   resulttype = CLASSTYPE)
        else:
            return cunboxedcls

src/s/y/Sypy-HEAD/rpython/lltypesystem/rtagged.py   Sypy(Download)
from pypy.objspace.flow.model import Constant
from pypy.rpython.rclass import getclassrepr, getinstancerepr, get_type_repr
from pypy.rpython.lltypesystem import lltype
from pypy.rpython.lltypesystem.rclass import InstanceRepr, CLASSTYPE, ll_inst_type
from pypy.rpython.lltypesystem.rclass import MissingRTypeAttribute
    def gettype_from_unboxed(self, llops, vinst, can_be_none=False):
        unboxedclass_repr = getclassrepr(self.rtyper, self.unboxedclassdef)
        cunboxedcls = inputconst(CLASSTYPE, unboxedclass_repr.getvtable())
        if self.is_parent:
            # If the lltype of vinst shows that it cannot be a tagged value,
                ctypeptr = inputconst(lltype.Void, 'typeptr')
                return llops.genop('getfield', [vinst, ctypeptr],
                                   resulttype = CLASSTYPE)
        else:
            return cunboxedcls

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/typesystem.py   plexnet(Download)
    def subclassOf(self, cpu, clsbox1, clsbox2):
        adr = clsbox2.getaddr(cpu)
        bounding_class = llmemory.cast_adr_to_ptr(adr, rclass.CLASSTYPE)
        adr = clsbox1.getaddr(cpu)
        real_class = llmemory.cast_adr_to_ptr(adr, rclass.CLASSTYPE)

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/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 _cast_exception(self, exception):
        return llmemory.cast_adr_to_ptr(
            cast_int_to_adr(self.memocast, exception),
            rclass.CLASSTYPE)
 
        result = do_new(size)
        value = lltype.cast_opaque_ptr(rclass.OBJECTPTR, result)
        value.typeptr = cast_from_int(rclass.CLASSTYPE, vtable, self.memocast)
        return result
 

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 _cast_exception(self, exception):
        return llmemory.cast_adr_to_ptr(
            llmemory.cast_int_to_adr(exception),
            rclass.CLASSTYPE)
 
        result = do_new(descr.ofs)
        value = lltype.cast_opaque_ptr(rclass.OBJECTPTR, result)
        value.typeptr = cast_from_int(rclass.CLASSTYPE, vtable)
        return result
 

src/s/y/Sypy-HEAD/jit/metainterp/blackhole.py   Sypy(Download)
    def bhimpl_goto_if_exception_mismatch(self, vtable, target, pc):
        adr = heaptracker.int2adr(vtable)
        bounding_class = llmemory.cast_adr_to_ptr(adr, rclass.CLASSTYPE)
        real_instance = self.exception_last_value
        assert real_instance

src/s/y/Sypy-HEAD/rlib/rgc.py   Sypy(Download)
    def compute_result_annotation(self, s_Class):
        from pypy.annotation import model as annmodel
        from pypy.rpython.lltypesystem import rclass
        assert s_Class.is_constant()
        return annmodel.SomePtr(rclass.CLASSTYPE)
        classrepr = getclassrepr(hop.rtyper, classdef)
        vtable = classrepr.getvtable()
        assert lltype.typeOf(vtable) == rclass.CLASSTYPE
        hop.exception_cannot_occur()
        return Constant(vtable, concretetype=rclass.CLASSTYPE)

src/s/y/Sypy-HEAD/jit/codewriter/heaptracker.py   Sypy(Download)
# ____________________________________________________________
 
VTABLETYPE = rclass.CLASSTYPE
 
def register_known_gctype(cpu, vtable, STRUCT):

src/s/y/Sypy-HEAD/jit/metainterp/pyjitpl.py   Sypy(Download)
            return
        adr = clsbox.getaddr()
        bounding_class = llmemory.cast_adr_to_ptr(adr, rclass.CLASSTYPE)
        if bounding_class.subclassrange_max - bounding_class.subclassrange_min == 1:
            # precise class knowledge, this can be used

  1 | 2  Next