Did I find the right examples for you? yes no

All Samples(986)  |  Call(917)  |  Derive(0)  |  Import(69)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/runner.py   plexnet(Download)
    def do_arraylen_gc(self, arraybox, arraydescr):
        array = arraybox.getref_base()
        return history.BoxInt(llimpl.do_arraylen_gc(arraydescr, array))
 
    def do_strlen(self, stringbox):
        string = stringbox.getref_base()
        return history.BoxInt(llimpl.do_strlen(0, string))
    def do_strgetitem(self, stringbox, indexbox):
        string = stringbox.getref_base()
        index = indexbox.getint()
        return history.BoxInt(llimpl.do_strgetitem(0, string, index))
 
    def do_unicodelen(self, stringbox):
        string = stringbox.getref_base()
        return history.BoxInt(llimpl.do_unicodelen(0, string))
    def do_unicodegetitem(self, stringbox, indexbox):
        string = stringbox.getref_base()
        index = indexbox.getint()
        return history.BoxInt(llimpl.do_unicodegetitem(0, string, index))
 

src/s/y/Sypy-HEAD/jit/metainterp/executor.py   Sypy(Download)
from pypy.rlib.rtimer import read_timestamp
from pypy.rlib.unroll import unrolling_iterable
from pypy.jit.metainterp.history import BoxInt, BoxPtr, BoxFloat, check_descr
from pypy.jit.metainterp.history import INT, REF, FLOAT, VOID, AbstractDescr
from pypy.jit.metainterp import resoperation
            metainterp.execute_raised(e)
            result = 0
        return BoxInt(result)
    if rettype == REF:
        try:
        return BoxFloat(cpu.bh_getarrayitem_gc_f(arraydescr, array, index))
    else:
        return BoxInt(cpu.bh_getarrayitem_gc_i(arraydescr, array, index))
 
def do_getarrayitem_raw(cpu, _, arraybox, indexbox, arraydescr):
        return BoxFloat(cpu.bh_getarrayitem_raw_f(arraydescr, array, index))
    else:
        return BoxInt(cpu.bh_getarrayitem_raw_i(arraydescr, array, index))
 
def do_setarrayitem_gc(cpu, _, arraybox, indexbox, itembox, arraydescr):
        return BoxFloat(cpu.bh_getinteriorfield_gc_f(array, index, descr))
    else:
        return BoxInt(cpu.bh_getinteriorfield_gc_i(array, index, descr))
 
def do_setinteriorfield_gc(cpu, _, arraybox, indexbox, valuebox, descr):

src/s/y/Sypy-HEAD/jit/metainterp/resume.py   Sypy(Download)
import sys, os
from pypy.jit.metainterp.history import Box, Const, ConstInt, getkind
from pypy.jit.metainterp.history import BoxInt, BoxPtr, BoxFloat
from pypy.jit.metainterp.history import INT, REF, FLOAT, HOLE
from pypy.jit.metainterp.history import AbstractDescr
            assert num >= 0
        if kind == INT:
            box = BoxInt(self.cpu.get_latest_value_int(num))
        elif kind == REF:
            box = BoxPtr(self.cpu.get_latest_value_ref(num))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llvm/runner.py   plexnet(Download)
from pypy.rlib import runicode
from pypy.jit.metainterp.history import AbstractDescr, INT
from pypy.jit.metainterp.history import BoxInt, BoxPtr
from pypy.jit.backend.model import AbstractCPU
from pypy.jit.backend.llvm import llvm_rffi
    def do_arraylen_gc(self, args, arraydescr):
        array = args[0].getref_base()
        p = rffi.cast(lltype.Ptr(self.gcarray_signed), array)
        res = len(p)
        return BoxInt(res)
    def do_strlen(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), s)
        res = len(p.chars)
        return BoxInt(res)
    def do_strgetitem(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), s)
        res = ord(p.chars[args[1].getint()])
        return BoxInt(res)
    def do_unicodelen(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.UNICODE), s)
        res = len(p.chars)
        return BoxInt(res)

src/s/y/Sypy-HEAD/jit/backend/llvm/runner.py   Sypy(Download)
from pypy.rlib import runicode
from pypy.jit.metainterp.history import AbstractDescr, INT
from pypy.jit.metainterp.history import BoxInt, BoxPtr
from pypy.jit.backend.model import AbstractCPU
from pypy.jit.backend.llvm import llvm_rffi
    def do_arraylen_gc(self, args, arraydescr):
        array = args[0].getref_base()
        p = rffi.cast(lltype.Ptr(self.gcarray_signed), array)
        res = len(p)
        return BoxInt(res)
    def do_strlen(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), s)
        res = len(p.chars)
        return BoxInt(res)
    def do_strgetitem(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.STR), s)
        res = ord(p.chars[args[1].getint()])
        return BoxInt(res)
    def do_unicodelen(self, args, descr=None):
        s = args[0].getref_base()
        p = lltype.cast_opaque_ptr(lltype.Ptr(rstr.UNICODE), s)
        res = len(p.chars)
        return BoxInt(res)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/pyjitpl.py   plexnet(Download)
            boxtype = fail_arg_types[i]
            if boxtype == history.INT:
                box = history.BoxInt(cpu.get_latest_value_int(i))
            elif boxtype == history.REF:
                box = cpu.ts.BoxRef(cpu.get_latest_value_ref(i))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llsupport/llmodel.py   plexnet(Download)
from pypy.rpython.annlowlevel import llhelper
from pypy.rlib.objectmodel import we_are_translated, specialize
from pypy.jit.metainterp.history import BoxInt, BoxPtr, set_future_values,\
     BoxFloat
from pypy.jit.backend.model import AbstractCPU
        gcref = arraybox.getref_base()
        length = rffi.cast(rffi.CArrayPtr(lltype.Signed), gcref)[ofs/WORD]
        return BoxInt(length)
 
    def do_getarrayitem_gc(self, arraybox, indexbox, arraydescr):
                val = items[itemindex]
                # --- end of GC unsafe code ---
                return BoxInt(rffi.cast(lltype.Signed, val))
        else:
            raise NotImplementedError("size = %d" % size)
            gcref = stringbox.getref_base()
            v = rffi.cast(rffi.CArrayPtr(lltype.Signed), gcref)[ofs_length/WORD]
            return BoxInt(v)
        return do_strlen
 
        i = indexbox.getint()
        v = rffi.cast(rffi.CArrayPtr(lltype.Char), gcref)[basesize + i]
        return BoxInt(ord(v))
 
    def do_unicodegetitem(self, stringbox, indexbox):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/executor.py   plexnet(Download)
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rlib.rarithmetic import ovfcheck, r_uint, intmask
from pypy.jit.metainterp.history import BoxInt, ConstInt, check_descr
from pypy.jit.metainterp.history import INT, REF, ConstFloat
from pypy.jit.metainterp import resoperation
        ovf = False
    cpu._overflow_flag = ovf
    return BoxInt(z)
 
def do_int_sub_ovf(cpu, box1, box2):
        ovf = False
    cpu._overflow_flag = ovf
    return BoxInt(z)
 
def do_int_mul_ovf(cpu, box1, box2):
        ovf = False
    cpu._overflow_flag = ovf
    return BoxInt(z)
 
# ----------

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/llimpl.py   plexnet(Download)
from pypy.objspace.flow.model import Variable, Constant
from pypy.annotation import model as annmodel
from pypy.jit.metainterp.history import (ConstInt, ConstPtr, ConstAddr,
                                         BoxInt, BoxPtr, BoxObj, BoxFloat,
                                         REF, INT, FLOAT)
                    for x in args:
                        if type(x) is int:
                            boxedargs.append(BoxInt(x))
                        elif type(x) is float:
                            boxedargs.append(BoxFloat(x))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/warmstate.py   plexnet(Download)
        return history.ConstInt(value)
    else:
        return history.BoxInt(value)
 
@specialize.arg(0)

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