Did I find the right examples for you? yes no

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

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/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
            self.large_ints[val] = tagged
            return tagged
        elif const.type == REF:
            val = const.getref_base()
            if not val:
    def concat_strings(self, str1num, str2num):
        cic = self.metainterp.staticdata.callinfocollection
        calldescr, func = cic.callinfo_for_oopspec(EffectInfo.OS_STR_CONCAT)
        str1box = self.decode_box(str1num, REF)
        str2box = self.decode_box(str2num, REF)
    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)

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
    def is_pointer_field(self):
        return self.typeinfo == REF
 
    def is_float_field(self):
        return self.typeinfo == FLOAT
 
    def is_array_of_pointers(self):
        return self.typeinfo == REF
    def do_getarrayitem_gc(self, arraybox, indexbox, arraydescr):
        assert isinstance(arraydescr, Descr)
        array = arraybox.getref_base()
        index = indexbox.getint()
        if arraydescr.typeinfo == REF:
    def do_getfield_gc(self, structbox, fielddescr):
        assert isinstance(fielddescr, Descr)
        struct = structbox.getref_base()
        if fielddescr.typeinfo == REF:
            return history.BoxPtr(llimpl.do_getfield_gc_ptr(struct,

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.REF
        cpu = metainterp_sd.cpu
        result = cpu.get_latest_value_ref(0)
        cpu.clear_latest_values(1)
            if box.type == history.INT:
                cnt = self.CNT_INT
            elif box.type == history.REF:
                cnt = self.CNT_REF
            elif box.type == history.FLOAT:
    for kind in redargtypes:
        if   kind == history.INT:   box = BoxInt()
        elif kind == history.REF:   box = BoxPtr()
        elif kind == history.FLOAT: box = BoxFloat()
        else: raise AssertionError
    if result_type == history.INT:
        result = BoxInt()
    elif result_type == history.REF:
        result = BoxPtr()
    elif result_type == history.FLOAT:

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]
    def consider_finish(self, op):
        locs = [self.loc(op.getarg(i)) for i in range(op.numargs())]
        locs_are_ref = [op.getarg(i).type == REF for i in range(op.numargs())]
        fail_index = self.assembler.cpu.get_fail_descr_number(op.getdescr())
        # note: no exception should currently be set in llop.get_exception_addr

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
        type = argboxes[i].type
        if   type == INT:   count_i += 1
        elif type == REF:   count_r += 1
        elif type == FLOAT: count_f += 1
    # allocate lists for each type that has at least one argument
            args_i[count_i] = box.getint()
            count_i += 1
        elif box.type == REF:
            args_r[count_r] = box.getref_base()
            count_r += 1
            result = 0
        return BoxInt(result)
    if rettype == REF:
        try:
            result = cpu.bh_call_r(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)
            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
            else: raise AssertionError(box.type)
        if got_type == history.INT:
            self.registers_i[target_index] = resultbox
        elif got_type == history.REF:
            #debug_print(' ->',
            #            llmemory.cast_ptr_to_adr(resultbox.getref_base()))
                self.registers_i[count_i] = box
                count_i += 1
            elif box.type == history.REF:
                self.registers_r[count_r] = box
                count_r += 1
                    if box.type == history.INT:
                        break
            elif kind == history.REF:
                while True:
                    box = argboxes[src_r]
                    src_r += 1
                    if box.type == history.REF:

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
    def write_failure_recovery_description(self, mc, failargs, locs):
        for i in range(len(failargs)):
            arg = failargs[i]
            if arg is not None:
                if arg.type == REF:
    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 = []
                assert result_loc is eax
                value = self.cpu.done_with_this_frame_int_v
            elif kind == REF:
                assert result_loc is eax
                value = self.cpu.done_with_this_frame_ref_v
                    adr = self.fail_boxes_int.get_addr_for_num(0)
                    self.mc.MOV(eax, heap(adr))
                elif kind == REF:
                    adr = self.fail_boxes_ptr.get_addr_for_num(0)
                    self.mc.MOV(eax, heap(adr))

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/optimizeopt.py   plexnet(Download)
from pypy.jit.metainterp.history import Box, BoxInt, LoopToken, BoxFloat,\
     ConstFloat
from pypy.jit.metainterp.history import Const, ConstInt, ConstPtr, ConstObj, REF
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.jit.metainterp.jitprof import OPT_OPS, OPT_GUARDS, OPT_FORCINGS
    def getinterned(self, box):
        constbox = self.get_constant_box(box)
        if constbox is None:
            return box
        if constbox.type == REF:

  1 | 2 | 3  Next