Did I find the right examples for you? yes no

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

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 X86XMMRegisterManager(RegisterManager):
 
    box_types = [FLOAT]
    all_regs = [xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7]
    # we never need lower byte I hope
    def frame_pos(i, box_type):
        if IS_X86_32 and box_type == FLOAT:
            return StackLoc(i, get_ebp_ofs(i+1), box_type)
        else:
            return StackLoc(i, get_ebp_ofs(i), box_type)
    @staticmethod
    def frame_size(box_type):
        if IS_X86_32 and box_type == FLOAT:
            assert isinstance(box, Box)
            #
            if IS_X86_32 and box.type == FLOAT:
                cur_frame_pos -= 2
            else:

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,
    INT : 1,
    REF : 1,
    FLOAT : 2,
    }
 
class X86XMMRegisterManager(RegisterManager):
 
    box_types = [FLOAT]
    all_regs = [xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7]
    # we never need lower byte I hope
            reg = None
            if arg not in self.loop_consts and self.longevity[arg][1] > -1:
                if arg.type == FLOAT:
                    # xxx is it really a good idea?  at the first CALL they
                    # will all be flushed anyway
            else:
                loc = self.sm.loc(arg, width_of_type[arg.type])
            if arg.type == FLOAT:
                floatlocs[i] = loc
            else:

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_float_field(self):
        return self.typeinfo == FLOAT
 
    def is_array_of_pointers(self):
        return self.typeinfo == REF
 
    def is_array_of_floats(self):
        return self.typeinfo == FLOAT
            return history.BoxInt(llimpl.do_getarrayitem_gc_int(array, index,
                                                               self.memo_cast))
        elif arraydescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_getarrayitem_gc_float(array,
                                                                    index))
                                                            fielddescr.ofs,
                                                            self.memo_cast))
        elif fielddescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_getfield_gc_float(struct,
                                                            fielddescr.ofs))

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 setfield(self, descr, structbox, fieldnum):
        if descr.is_pointer_field():
            kind = REF
        elif descr.is_float_field():
            kind = FLOAT
    def setinteriorfield(self, index, descr, array, fieldnum):
        if descr.is_pointer_field():
            kind = REF
        elif descr.is_float_field():
            kind = FLOAT
    def setarrayitem_float(self, arraydescr, arraybox, index, fieldnum):
        self._setarrayitem(arraydescr, arraybox, index, fieldnum, FLOAT)
 
    def _setarrayitem(self, arraydescr, arraybox, index, fieldnum, kind):
        itembox = self.decode_box(fieldnum, kind)
    def decode_float(self, tagged):
        return self.decode_box(tagged, FLOAT)
 
    def decode_box(self, tagged, kind):
        num, tag = untag(tagged)

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.FLOAT
        result = metainterp_sd.cpu.get_latest_value_float(0)
        raise metainterp_sd.DoneWithThisFrameFloat(result)
 
            elif box.type == history.REF:
                cnt = self.CNT_REF
            elif box.type == history.FLOAT:
                cnt = self.CNT_FLOAT
            else:
        if   kind == history.INT:   box = BoxInt()
        elif kind == history.REF:   box = BoxPtr()
        elif kind == history.FLOAT: box = BoxFloat()
        else: raise AssertionError
        inputargs.append(box)
    elif result_type == history.REF:
        result = BoxPtr()
    elif result_type == history.FLOAT:
        result = BoxFloat()
    elif result_type == history.VOID:

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
        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
    if count_i: args_i = [0] * count_i
            args_r[count_r] = box.getref_base()
            count_r += 1
        elif box.type == FLOAT:
            args_f[count_f] = box.getfloatstorage()
            count_f += 1
            result = NULL
        return BoxPtr(result)
    if rettype == FLOAT or rettype == 'L':     # *L*ong long
        try:
            result = cpu.bh_call_f(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)
        elif arraydescr.typeinfo == INT:
            return do_getarrayitem_gc_int(array, index, self.memocast)
        elif arraydescr.typeinfo == FLOAT:
            return do_getarrayitem_gc_float(array, index)
        else:
        elif fielddescr.typeinfo == INT:
            return do_getfield_gc_int(struct, fielddescr.ofs, self.memocast)
        elif fielddescr.typeinfo == FLOAT:
            return do_getfield_gc_float(struct, fielddescr.ofs)
        else:
        elif fielddescr.typeinfo == INT:
            return do_getfield_raw_int(struct, fielddescr.ofs, self.memocast)
        elif fielddescr.typeinfo == FLOAT:
            return do_getfield_raw_float(struct, fielddescr.ofs, self.memocast)
        else:
        elif arraydescr.typeinfo == INT:
            do_setarrayitem_gc_int(array, index, newvalue, self.memocast)
        elif arraydescr.typeinfo == FLOAT:
            do_setarrayitem_gc_float(array, index, newvalue)
        else:

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
            # are "typed"
            if ((isinstance(loc, RegLoc) and loc.is_xmm) or
                (isinstance(loc, StackLoc) and loc.type == FLOAT) or
                (isinstance(loc, ConstFloatLoc))):
                if len(unused_xmm) > 0:
            loc = pass_on_stack[i]
            if not isinstance(loc, RegLoc):
                if isinstance(loc, StackLoc) and loc.type == FLOAT:
                    self.mc.MOVSD(X86_64_XMM_SCRATCH_REG, loc)
                    self.mc.MOVSD_sx(i*WORD, X86_64_XMM_SCRATCH_REG.value)
    def genop_guard_guard_value(self, ign_1, guard_op, guard_token, locs, ign_2):
        if guard_op.getarg(0).type == FLOAT:
            assert guard_op.getarg(1).type == FLOAT
            self.mc.UCOMISD(locs[0], locs[1])
        else:

src/s/y/Sypy-HEAD/jit/metainterp/pyjitpl.py   Sypy(Download)
            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)
 
            #            llmemory.cast_ptr_to_adr(resultbox.getref_base()))
            self.registers_r[target_index] = resultbox
        elif got_type == history.FLOAT:
            self.registers_f[target_index] = resultbox
        else:
                self.registers_r[count_r] = box
                count_r += 1
            elif box.type == history.FLOAT:
                self.registers_f[count_f] = box
                count_f += 1
                    if box.type == history.REF:
                        break
            elif kind == history.FLOAT or kind == 'L':    # long long
                while True:
                    box = argboxes[src_f]
                    src_f += 1
                    if box.type == history.FLOAT:

src/s/y/Sypy-HEAD/jit/backend/llgraph/runner.py   Sypy(Download)
from pypy.rpython.llinterp import LLInterpreter
from pypy.jit.metainterp import history
from pypy.jit.metainterp.history import REF, INT, FLOAT, STRUCT
from pypy.jit.metainterp.warmstate import unwrap
from pypy.jit.metainterp.resoperation import rop
    def is_float_field(self):
        return self.typeinfo == FLOAT
 
    def is_array_of_pointers(self):
        return self.typeinfo == REF
 
    def is_array_of_floats(self):
        return self.typeinfo == FLOAT
    def fielddescrof_dynamic(self, offset, fieldsize, is_pointer, is_float, is_signed):
        if is_pointer:
            typeinfo = REF
        elif is_float:
            typeinfo = FLOAT
            typeinfo = REF
        elif is_float:
            typeinfo = FLOAT
        else:
            typeinfo = INT

  1 | 2 | 3  Next