Did I find the right examples for you? yes no

All Samples(120)  |  Call(91)  |  Derive(0)  |  Import(29)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llgraph/runner.py   plexnet(Download)
                                                               self.memo_cast))
        elif arraydescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_getarrayitem_gc_float(array,
                                                                    index))
        else:
                                                            self.memo_cast))
        elif fielddescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_getfield_gc_float(struct,
                                                            fielddescr.ofs))
        else:
                                                             self.memo_cast))
        elif fielddescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_getfield_raw_float(struct,
                                                             fielddescr.ofs,
                                                             self.memo_cast))
            return history.BoxInt(llimpl.do_call_int(func, self.memo_cast))
        elif calldescr.typeinfo == FLOAT:
            return history.BoxFloat(llimpl.do_call_float(func, self.memo_cast))
        elif calldescr.typeinfo == 'v':  # void
            llimpl.do_call_void(func, self.memo_cast)
def boxresult(RESULT, result):
    if isinstance(RESULT, ootype.OOType):
        return history.BoxObj(ootype.cast_to_object(result))
    elif RESULT is lltype.Float:
        return history.BoxFloat(result)

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 = longlong.ZEROF
        return BoxFloat(result)
    if rettype == VOID:
        try:
        return BoxPtr(cpu.bh_getarrayitem_gc_r(arraydescr, array, index))
    elif arraydescr.is_array_of_floats():
        return BoxFloat(cpu.bh_getarrayitem_gc_f(arraydescr, array, index))
    else:
        return BoxInt(cpu.bh_getarrayitem_gc_i(arraydescr, array, index))
    assert not arraydescr.is_array_of_pointers()
    if arraydescr.is_array_of_floats():
        return BoxFloat(cpu.bh_getarrayitem_raw_f(arraydescr, array, index))
    else:
        return BoxInt(cpu.bh_getarrayitem_raw_i(arraydescr, array, index))
        return BoxPtr(cpu.bh_getinteriorfield_gc_r(array, index, descr))
    elif descr.is_float_field():
        return BoxFloat(cpu.bh_getinteriorfield_gc_f(array, index, descr))
    else:
        return BoxInt(cpu.bh_getinteriorfield_gc_i(array, index, 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
            box = BoxPtr(self.cpu.get_latest_value_ref(num))
        elif kind == FLOAT:
            box = BoxFloat(self.cpu.get_latest_value_float(num))
        else:
            assert 0, "bad kind: %d" % ord(kind)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/warmstate.py   plexnet(Download)
            return history.ConstFloat(value)
        else:
            return history.BoxFloat(value)
    else:
        value = intmask(value)

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/pyjitpl.py   plexnet(Download)
                box = cpu.ts.BoxRef(cpu.get_latest_value_ref(i))
            elif boxtype == history.FLOAT:
                box = history.BoxFloat(cpu.get_latest_value_float(i))
            else:
                assert False, "bad box type: num=%d" % ord(boxtype)

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)
                            boxedargs.append(BoxInt(x))
                        elif type(x) is float:
                            boxedargs.append(BoxFloat(x))
                        elif isinstance(ootype.typeOf(x), ootype.OOType):
                            boxedargs.append(BoxObj(ootype.cast_to_object(x)))

src/s/y/Sypy-HEAD/jit/metainterp/warmstate.py   Sypy(Download)
            return history.ConstFloat(value)
        else:
            return history.BoxFloat(value)
    elif isinstance(value, str) or isinstance(value, unicode):
        assert len(value) == 1     # must be a character

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
            fval = items[itemindex]
            # --- end of GC unsafe code ---
            return BoxFloat(fval)
        #
        for TYPE, itemsize in unroll_basic_sizes:
            fval = rffi.cast(rffi.CArrayPtr(lltype.Float), field)[0]
            # --- end of GC unsafe code ---
            return BoxFloat(fval)
        #
        for TYPE, itemsize in unroll_basic_sizes:
            return BoxPtr(self.get_latest_value_ref(0))
        elif calldescr.returns_a_float():
            return BoxFloat(self.get_latest_value_float(0))
        elif calldescr.get_result_size(self.translate_support_code) > 0:
            return BoxInt(self.get_latest_value_int(0))

src/s/y/Sypy-HEAD/jit/backend/llgraph/runner.py   Sypy(Download)
def boxresult(RESULT, result):
    if isinstance(RESULT, ootype.OOType):
        return history.BoxObj(ootype.cast_to_object(result))
    elif RESULT is lltype.Float:
        return history.BoxFloat(result)

src/s/y/Sypy-HEAD/jit/metainterp/compile.py   Sypy(Download)
from pypy.jit.metainterp.history import TreeLoop, Box, History, JitCellToken, TargetToken
from pypy.jit.metainterp.history import AbstractFailDescr, BoxInt
from pypy.jit.metainterp.history import BoxPtr, BoxObj, BoxFloat, Const, ConstInt
from pypy.jit.metainterp import history
from pypy.jit.metainterp.typesystem import llhelper, oohelper
        if   kind == history.INT:   box = BoxInt()
        elif kind == history.REF:   box = BoxPtr()
        elif kind == history.FLOAT: box = BoxFloat()
        else: raise AssertionError
        inputargs.append(box)
        result = BoxPtr()
    elif result_type == history.FLOAT:
        result = BoxFloat()
    elif result_type == history.VOID:
        result = None

  1 | 2 | 3 | 4  Next