Did I find the right examples for you? yes no

All Samples(35)  |  Call(25)  |  Derive(0)  |  Import(10)

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/optimizer.py   Sypy(Download)
from pypy.jit.metainterp import jitprof, resume, compile
from pypy.jit.metainterp.executor import execute_nonspec
from pypy.jit.metainterp.history import BoxInt, BoxFloat, Const, ConstInt, REF, INT
from pypy.jit.metainterp.optimizeopt.intutils import IntBound, IntUnbounded, \
                                                     ImmutableIntUnbounded, \
    def constant_fold(self, op):
        argboxes = [self.get_constant_box(op.getarg(i))
                    for i in range(op.numargs())]
        resbox = execute_nonspec(self.cpu, None,
                                 op.getopnum(), argboxes, op.getdescr())

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/optimizeopt.py   plexnet(Download)
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.jit.metainterp.jitprof import OPT_OPS, OPT_GUARDS, OPT_FORCINGS
from pypy.jit.metainterp.executor import execute_nonspec
from pypy.jit.metainterp.specnode import SpecNode, NotSpecNode, ConstantSpecNode
from pypy.jit.metainterp.specnode import AbstractVirtualStructSpecNode
                # all constant arguments: constant-fold away
                argboxes = [self.get_constant_box(arg) for arg in op.args]
                resbox = execute_nonspec(self.cpu, op.opnum, argboxes, op.descr)
                self.make_constant(op.result, resbox.constbox())
                return

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/optimizefindnode.py   plexnet(Download)
from pypy.jit.metainterp.history import AbstractValue, ConstInt, Const
from pypy.jit.metainterp.resoperation import rop
from pypy.jit.metainterp.executor import execute_nonspec
from pypy.jit.metainterp.optimizeutil import av_newdict, _findall, sort_descrs
from pypy.jit.metainterp.optimizeutil import InvalidLoop
                # all constant arguments: we can constant-fold
                argboxes = [self.get_constant_box(arg) for arg in op.args]
                resbox = execute_nonspec(self.cpu, op.opnum, argboxes, op.descr)
                self.set_constant_node(op.result, resbox.constbox())
        # default case: mark the arguments as escaping

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/test/test_executor.py   plexnet(Download)
import py
import sys, random
from pypy.rlib.rarithmetic import r_uint, intmask
from pypy.jit.metainterp.executor import make_execute_list, execute
from pypy.jit.metainterp.executor import execute_varargs, execute_nonspec
    # arity == -1
    argboxes = [BoxInt(321), ConstInt(123)]
    box = execute_nonspec(cpu, rop.CALL, argboxes, descr)
    assert box.args == ('call', argboxes, descr)
    # arity == 0
    box = execute_nonspec(cpu, rop.NEW, [], descr)
    assert box.args == ('new', descr)
    # arity == 1
    box1 = BoxInt(515)
    box = execute_nonspec(cpu, rop.ARRAYLEN_GC, [box1], descr)
    # arity == 2
    box2 = BoxInt(222)
    box = execute_nonspec(cpu, rop.SETFIELD_GC, [box1, box2], descr)
    assert box.args == ('setfield_gc', box1, box2, descr)
    # arity == 3

src/s/y/Sypy-HEAD/jit/metainterp/test/test_executor.py   Sypy(Download)
from pypy.rpython.lltypesystem import lltype, llmemory
from pypy.jit.metainterp.executor import execute
from pypy.jit.metainterp.executor import execute_varargs, execute_nonspec
from pypy.jit.metainterp.resoperation import rop, opboolinvers, opboolreflex, opname
from pypy.jit.metainterp.history import BoxInt, ConstInt
    # arity == -1
    argboxes = [BoxInt(321), ConstInt(123)]
    box = execute_nonspec(cpu, FakeMetaInterp(), rop.CALL,
                          argboxes, FakeCallDescr())
    assert box.getfloat() == 42.5
    # arity == 0
    box = execute_nonspec(cpu, None, rop.NEW, [], descr)
    # arity == 1
    box1 = BoxPtr()
    box = execute_nonspec(cpu, None, rop.ARRAYLEN_GC, [box1], descr)
    assert box.value == 55
    # arity == 2
    box2 = boxfloat(222.2)
    fielddescr = FakeFieldDescr()
    execute_nonspec(cpu, None, rop.SETFIELD_GC, [box1, box2], fielddescr)

src/s/y/Sypy-HEAD/jit/backend/test/test_random.py   Sypy(Download)
from pypy.jit.metainterp.history import INT, FLOAT
from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.metainterp.executor import execute_nonspec
from pypy.jit.metainterp.resoperation import opname
from pypy.jit.codewriter import longlong
    def do(self, opnum, argboxes, descr=None):
        self.fakemetainterp._got_exc = None
        v_result = execute_nonspec(self.cpu, self.fakemetainterp,
                                   opnum, argboxes, descr)
        if isinstance(v_result, Const):

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/test/test_random.py   plexnet(Download)
from pypy.jit.metainterp.history import BoxFloat, ConstFloat, Const
from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.metainterp.executor import execute_nonspec
from pypy.jit.metainterp.resoperation import opname
 
    def do(self, opnum, argboxes, descr=None):
        v_result = execute_nonspec(self.cpu, opnum, argboxes, descr)
        if isinstance(v_result, Const):
            v_result = v_result.clonebox()
        self.loop.operations.append(ResOperation(opnum, argboxes, v_result,

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/test/test_optimizeopt.py   Sypy(Download)
    def test_constfold_all(self):
        from pypy.jit.backend.llgraph.llimpl import TYPES     # xxx fish
        from pypy.jit.metainterp.executor import execute_nonspec
        from pypy.jit.metainterp.history import BoxInt
        import random

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/test/test_optimizebasic.py   Sypy(Download)
    def test_constfold_all(self):
        from pypy.jit.backend.llgraph.llimpl import TYPES     # xxx fish
        from pypy.jit.metainterp.executor import execute_nonspec
        from pypy.jit.metainterp.history import BoxInt
        import random

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/metainterp/test/test_optimizeopt.py   plexnet(Download)
    def test_constfold_all(self):
        from pypy.jit.backend.llgraph.llimpl import TYPES     # xxx fish
        from pypy.jit.metainterp.executor import execute_nonspec
        from pypy.jit.metainterp.history import BoxInt
        import random