Did I find the right examples for you? yes no

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

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
    def getconst(self, const):
        if const.type == INT:
            val = const.getint()
            if not we_are_translated() and not isinstance(val, int):
                # unhappiness, probably a symbolic
    def string_setitem(self, strbox, index, charnum):
        charbox = self.decode_box(charnum, INT)
        self.metainterp.execute_and_record(rop.STRSETITEM, None,
                                           strbox, ConstInt(index), charbox)
    def slice_string(self, strnum, startnum, lengthnum):
        cic = self.metainterp.staticdata.callinfocollection
        calldescr, func = cic.callinfo_for_oopspec(EffectInfo.OS_STR_SLICE)
        strbox = self.decode_box(strnum, REF)
        startbox = self.decode_box(startnum, INT)
        lengthbox = self.decode_box(lengthnum, INT)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/x86/regalloc.py   plexnet(Download)
""" Register allocation scheme.
from pypy.jit.metainterp.history import (Box, Const, ConstInt, ConstPtr,
width_of_type = {
    INT : 1,
    REF : 1,
    FLOAT : 2,
class X86RegisterManager(RegisterManager):
    box_types = [INT, REF]

src/s/y/Sypy-HEAD/jit/metainterp/compile.py   Sypy(Download)
    def handle_fail(self, metainterp_sd, jitdriver_sd):
        assert jitdriver_sd.result_type == history.INT
        result = metainterp_sd.cpu.get_latest_value_int(0)
        raise metainterp_sd.DoneWithThisFrameInt(result)
            if i > self.CNT_BASE_MASK:
                return    # probably never, but better safe than sorry
            if box.type == history.INT:
                cnt = self.CNT_INT
            elif box.type == history.REF:
    inputargs = []
    for kind in redargtypes:
        if   kind == history.INT:   box = BoxInt()
        elif kind == history.REF:   box = BoxPtr()
        elif kind == history.FLOAT: box = BoxFloat()
    result_type = jitdriver_sd.result_type
    if result_type == history.INT:
        result = BoxInt()
    elif result_type == history.REF:

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/runner.py   plexnet(Download)
from pypy.rpython.llinterp import LLInterpreter
from pypy.jit.metainterp import history
from pypy.jit.metainterp.history import REF, INT, FLOAT
from pypy.jit.metainterp.warmstate import unwrap
from pypy.jit.metainterp.resoperation import ResOperation, rop
        if arraydescr.typeinfo == REF:
            return history.BoxPtr(llimpl.do_getarrayitem_gc_ptr(array, index))
        elif arraydescr.typeinfo == INT:
            return history.BoxInt(llimpl.do_getarrayitem_gc_int(array, index,
            return history.BoxPtr(llimpl.do_getfield_gc_ptr(struct,
        elif fielddescr.typeinfo == INT:
            return history.BoxInt(llimpl.do_getfield_gc_int(struct,
        elif fielddescr.typeinfo == INT:
            return history.BoxInt(llimpl.do_getfield_raw_int(struct,
            newvalue = newvaluebox.getref_base()
            llimpl.do_setarrayitem_gc_ptr(array, index, newvalue)
        elif arraydescr.typeinfo == INT:
            newvalue = newvaluebox.getint()
            llimpl.do_setarrayitem_gc_int(array, index, newvalue,

src/s/y/Sypy-HEAD/jit/backend/x86/regalloc.py   Sypy(Download)
import os
from pypy.jit.metainterp.history import (Box, Const, ConstInt, ConstPtr,
                                         ResOperation, BoxPtr, ConstFloat,
                                         BoxFloat, INT, REF, FLOAT,
class X86RegisterManager(RegisterManager):
    box_types = [INT, REF]
    all_regs = [ecx, eax, edx, ebx, esi, edi]
    no_lower_byte_regs = [esi, edi]

src/s/y/Sypy-HEAD/jit/metainterp/executor.py   Sypy(Download)
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
from pypy.jit.metainterp.resoperation import rop
    for i in range(1, len(argboxes)):
        type = argboxes[i].type
        if   type == INT:   count_i += 1
        elif type == REF:   count_r += 1
        elif type == FLOAT: count_f += 1
    for i in range(1, len(argboxes)):
        box = argboxes[i]
        if   box.type == INT:
            args_i[count_i] = box.getint()
            count_i += 1
    # do the call using the correct function from the cpu
    rettype = descr.get_result_type()
    if rettype == INT or rettype == 'S':       # *S*ingle float
            result = cpu.bh_call_i(func, descr, args_i, args_r, args_f)

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)
    def op_getarrayitem_gc(self, arraydescr, array, index):
        if arraydescr.typeinfo == REF:
            return do_getarrayitem_gc_ptr(array, index)
        elif arraydescr.typeinfo == INT:
            return do_getarrayitem_gc_int(array, index, self.memocast)
    def op_getfield_gc(self, fielddescr, struct):
        if fielddescr.typeinfo == REF:
            return do_getfield_gc_ptr(struct, fielddescr.ofs)
        elif fielddescr.typeinfo == INT:
            return do_getfield_gc_int(struct, fielddescr.ofs, self.memocast)
    def op_getfield_raw(self, fielddescr, struct):
        if fielddescr.typeinfo == REF:
            return do_getfield_raw_ptr(struct, fielddescr.ofs, self.memocast)
        elif fielddescr.typeinfo == INT:
            return do_getfield_raw_int(struct, fielddescr.ofs, self.memocast)
    def op_setarrayitem_gc(self, arraydescr, array, index, newvalue):
        if arraydescr.typeinfo == REF:
            do_setarrayitem_gc_ptr(array, index, newvalue)
        elif arraydescr.typeinfo == INT:
            do_setarrayitem_gc_int(array, index, newvalue, self.memocast)

src/s/y/Sypy-HEAD/jit/metainterp/pyjitpl.py   Sypy(Download)
            index = ord(code[position+i])
            box = outvalue[startindex+i]
            if   box.type == history.INT:   self.registers_i[index] = box
            elif box.type == history.REF:   self.registers_r[index] = box
            elif box.type == history.FLOAT: self.registers_f[index] = box
        #    assert typeof[self.jitcode._resulttypes[self.pc]] == got_type
        target_index = ord(self.bytecode[self.pc-1])
        if got_type == history.INT:
            self.registers_i[target_index] = resultbox
        elif got_type == history.REF:
    def setup_call(self, argboxes):
        self.pc = 0
        count_i = count_r = count_f = 0
        for box in argboxes:
            if box.type == history.INT:
        i = 1
        for kind in descr.get_arg_types():
            if kind == history.INT or kind == 'S':        # single float
                while True:
                    box = argboxes[src_i]
                    src_i += 1
                    if box.type == history.INT:

src/s/y/Sypy-HEAD/jit/backend/x86/assembler.py   Sypy(Download)
import sys, os
from pypy.jit.backend.llsupport import symbolic
from pypy.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
from pypy.jit.metainterp.history import Const, Box, BoxInt, ConstInt
from pypy.jit.metainterp.history import AbstractFailDescr, INT, REF, FLOAT
                if arg.type == REF:
                    kind = self.DESCR_REF
                elif arg.type == INT:
                    kind = self.DESCR_INT
                elif arg.type == FLOAT:
    def rebuild_faillocs_from_descr(self, bytecode):
        from pypy.jit.backend.x86.regalloc import X86FrameManager
        descr_to_box_type = [REF, INT, FLOAT]
        bytecode = rffi.cast(rffi.UCHARP, bytecode)
        arglocs = []
            kind = op.result.type
            if kind == INT:
                assert result_loc is eax
                value = self.cpu.done_with_this_frame_int_v
                assert result_loc is eax
                if kind == INT:
                    adr = self.fail_boxes_int.get_addr_for_num(0)
                    self.mc.MOV(eax, heap(adr))

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/vstring.py   Sypy(Download)
from pypy.jit.codewriter.effectinfo import EffectInfo
from pypy.jit.metainterp.history import (BoxInt, Const, ConstInt, ConstPtr,
    get_const_ptr_for_string, get_const_ptr_for_unicode, BoxPtr, REF, INT)
from pypy.jit.metainterp.optimizeopt import optimizer, virtualize
from pypy.jit.metainterp.optimizeopt.optimizer import CONST_0, CONST_1
    def _optimize_COPYSTRCONTENT(self, op, mode):
        # args: src dst srcstart dststart length
        assert op.getarg(0).type == REF
        assert op.getarg(1).type == REF
        assert op.getarg(2).type == INT
        assert op.getarg(3).type == INT
        assert op.getarg(4).type == INT

  1 | 2 | 3 | 4  Next