Did I find the right examples for you? yes no

All Samples(429)  |  Call(382)  |  Derive(0)  |  Import(47)

src/s/y/Sypy-HEAD/jit/metainterp/compile.py   Sypy(Download)
from pypy.tool.sourcetools import func_with_new_name
 
from pypy.jit.metainterp.resoperation import ResOperation, rop, get_deep_immutable_oplist
from pypy.jit.metainterp.history import TreeLoop, Box, History, JitCellToken, TargetToken
from pypy.jit.metainterp.history import AbstractFailDescr, BoxInt
    h_ops = history.operations
    part.resume_at_jump_descr = resume_at_jump_descr
    part.operations = [ResOperation(rop.LABEL, inputargs, None, descr=TargetToken(jitcell_token))] + \
                      [h_ops[i].clone() for i in range(start, len(h_ops))] + \
                      [ResOperation(rop.LABEL, jumpargs, None, descr=jitcell_token)]
        part.operations = [part.operations[-1]] + \
                          [inliner.inline_op(h_ops[i]) for i in range(start, len(h_ops))] + \
                          [ResOperation(rop.JUMP, [inliner.inline_arg(a) for a in jumpargs],
                                        None, descr=jitcell_token)]
        target_token = part.operations[0].getdescr()
    part.operations = [partial_trace.operations[-1]] + \
                      [h_ops[i].clone() for i in range(start, len(h_ops))] + \
                      [ResOperation(rop.JUMP, jumpargs, None, descr=loop_jitcell_token)]
    label = part.operations[0]
    orignial_label = label.clone()

src/s/y/Sypy-HEAD/jit/backend/llsupport/rewrite.py   Sypy(Download)
import sys
from pypy.rlib.rarithmetic import ovfcheck
from pypy.jit.metainterp.history import ConstInt, BoxPtr, ConstPtr
from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.codewriter import heaptracker
            self.handle_new_fixedsize(descr, op)
            if self.gc_ll_descr.fielddescr_vtable is not None:
                op = ResOperation(rop.SETFIELD_GC,
                                  [op.result, ConstInt(classint)], None,
                                  descr=self.gc_ll_descr.fielddescr_vtable)
    def _gen_call_malloc_gc(self, args, v_result, descr):
        """Generate a CALL_MALLOC_GC with the given args."""
        self.emitting_an_operation_that_can_collect()
        op = ResOperation(rop.CALL_MALLOC_GC, args, v_result, descr)
        self.newops.append(op)
                # if the total size is still reasonable, merge it
                self._op_malloc_nursery.setarg(0, ConstInt(total_size))
                op = ResOperation(rop.INT_ADD,
                                  [self._v_last_malloced_nursery,
                                   ConstInt(self._previous_size)],
                                  v_result)
        if op is None:
            # if we failed to merge with a previous MALLOC_NURSERY, emit one
            self.emitting_an_operation_that_can_collect()
            op = ResOperation(rop.CALL_MALLOC_NURSERY,

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llsupport/gc.py   plexnet(Download)
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from pypy.jit.metainterp.history import BoxInt, BoxPtr, ConstInt, ConstPtr
from pypy.jit.metainterp.resoperation import ResOperation, rop
from pypy.jit.backend.llsupport import symbolic
from pypy.jit.backend.llsupport.symbolic import WORD
                    addr = self.gcrefs.get_address_of_gcref(v.value)
                    addr = cpu.cast_adr_to_int(addr)
                    newops.append(ResOperation(rop.GETFIELD_RAW,
                                               [ConstInt(addr)], box,
                                               self.single_gcref_descr))
                                             bool(v.value)): # store a non-NULL
                    self._gen_write_barrier(cpu, newops, op.args[0], v)
                    op = ResOperation(rop.SETFIELD_RAW, op.args, None,
                                      descr=op.descr)
            # ---------- write barrier for SETARRAYITEM_GC ----------
                                             bool(v.value)): # store a non-NULL
                    self._gen_write_barrier(cpu, newops, op.args[0], v)
                    op = ResOperation(rop.SETARRAYITEM_RAW, op.args, None,
                                      descr=op.descr)
            # ----------
    def _gen_write_barrier(self, cpu, newops, v_base, v_value):
        v_tid = BoxInt()
        newops.append(ResOperation(rop.GETFIELD_RAW, [v_base], v_tid,
                                   descr=self.fielddescr_tid))
        llop1 = self.llop1

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/unroll.py   Sypy(Download)
from pypy.jit.metainterp.optimizeopt.generalize import KillHugeIntBounds
from pypy.jit.metainterp.inliner import Inliner
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.jit.metainterp.resume import Snapshot
import sys, os
        cell_token = jumpop.getdescr()
        assert isinstance(cell_token, JitCellToken)
        stop_label = ResOperation(rop.LABEL, jumpop.getarglist(), None, TargetToken(cell_token))
 
 
            if start_label and self.jump_to_start_label(start_label, stop_label):
                # Initial label matches, jump to it
                jumpop = ResOperation(rop.JUMP, stop_label.getarglist(), None,
                                      descr=start_label.getdescr())
                if self.short:
                values[i].force_box(self.optimizer)
            if original_jump_args[i] is not jump_args[i]:
                op = ResOperation(rop.SAME_AS, [jump_args[i]], original_jump_args[i])
                self.optimizer.emit_operation(op)
        inputarg_setup_ops = self.optimizer.get_newoperations()
        targetop.initarglist(inputargs)
        target_token.virtual_state = virtual_state
        target_token.short_preamble = [ResOperation(rop.LABEL, short_inputargs, None)]
        target_token.resume_at_jump_descr = resume_at_jump_descr
 

src/s/y/Sypy-HEAD/jit/backend/x86/assembler.py   Sypy(Download)
from pypy.rlib.objectmodel import we_are_translated, specialize
from pypy.jit.backend.x86 import rx86, regloc, codebuf
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.jit.backend.x86.support import values_array
from pypy.jit.backend.x86 import support
        box = BoxInt()
        box2 = BoxInt()
        ops = [ResOperation(rop.GETFIELD_RAW, [c_adr],
                            box, descr=self.debug_counter_descr),
               ResOperation(rop.INT_ADD, [box, ConstInt(1)], box2),
               ResOperation(rop.SETFIELD_RAW, [c_adr, box2],

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/virtualize.py   Sypy(Download)
from pypy.jit.metainterp.optimizeopt.util import (make_dispatcher_method,
    descrlist_dict, sort_descrs)
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.rlib.objectmodel import we_are_translated
from pypy.jit.metainterp.optimizeopt.optimizer import OptValue
                    continue
                subbox = value.force_box(optforce)
                op = ResOperation(rop.SETFIELD_GC, [box, subbox], None,
                                  descr=ofs)
 
                    continue
                subbox = subvalue.force_box(optforce)
                op = ResOperation(rop.SETARRAYITEM_GC,
                                  [box, ConstInt(index), subbox], None,
                                  descr=self.arraydescr)
            for descr, value in iteritems:
                subbox = value.force_box(optforce)
                op = ResOperation(rop.SETINTERIORFIELD_GC,
                    [box, ConstInt(index), subbox], None, descr=descr
                )
        # 'jit_virtual_ref'.  The jit_virtual_ref structure may be forced soon,
        # but the point is that doing so does not force the original structure.
        op = ResOperation(rop.NEW_WITH_VTABLE, [c_cls], op.result)
        vrefvalue = self.make_virtual(c_cls, op.result, op)
        tokenbox = BoxInt()

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/rewrite.py   Sypy(Download)
from pypy.jit.metainterp.optimizeopt.optimizer import *
from pypy.jit.metainterp.optimizeopt.util import _findall, make_dispatcher_method
from pypy.jit.metainterp.resoperation import (opboolinvers, opboolreflex, rop,
    ResOperation)
from pypy.rlib.rarithmetic import highest_bit
            pass
        else:
            targs = self.optimizer.make_args_key(ResOperation(oldopnum, [args[0], args[1]],
                                                              None))
            if self.try_boolinvers(op, targs):
            pass
        else:
            targs = self.optimizer.make_args_key(ResOperation(oldopnum, [args[1], args[0]],
                                                              None))
            oldop = self.get_pure_result(targs)
            pass
        else:
            targs = self.optimizer.make_args_key(ResOperation(oldopnum, [args[1], args[0]],
                                                              None))
            if self.try_boolinvers(op, targs):
                elif v1.box.getfloat() == -1.0:
                    self.emit_operation(ResOperation(
                        rop.FLOAT_NEG, [rhs], op.result
                    ))
                    return

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/vstring.py   Sypy(Download)
from pypy.jit.metainterp.optimizeopt.optimizer import llhelper, REMOVED
from pypy.jit.metainterp.optimizeopt.util import make_dispatcher_method
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.rlib.objectmodel import specialize, we_are_translated
from pypy.rlib.unroll import unrolling_iterable
        if lengthbox is None:
            lengthbox = BoxInt()
        string_optimizer.emit_operation(ResOperation(mode.STRLEN, [box], lengthbox))
        return lengthbox
 
        self.box = box = self.source_op.result
        lengthbox = self.getstrlen(optforce, self.mode, None)
        op = ResOperation(self.mode.NEWSTR, [lengthbox], box)
        if not we_are_translated():
            op.name = 'FORCE'
                if not (isinstance(charbox, Const) and
                        charbox.same_constant(CONST_0)):
                    op = ResOperation(mode.STRSETITEM, [targetbox,
                                                        offsetbox,
                                                        charbox],
            srcoffsetbox = _int_add(string_optimizer, srcoffsetbox, CONST_1)
            assert isinstance(targetbox, BoxPtr)   # ConstPtr never makes sense
            string_optimizer.emit_operation(ResOperation(mode.STRSETITEM, [targetbox,
                                                                           offsetbox,
                                                                           charbox],

src/p/l/plexnet-HEAD/third_party/generic/pypy/pypy/jit/backend/llsupport/descr.py   plexnet(Download)
from pypy.rpython.lltypesystem import lltype
from pypy.jit.backend.llsupport import symbolic
from pypy.jit.metainterp.history import AbstractDescr, getkind, BoxInt, BoxPtr
from pypy.jit.metainterp.history import BasicFailDescr, LoopToken, BoxFloat
from pypy.jit.metainterp.resoperation import ResOperation, rop
            result_list = [result]
        operations = [
            ResOperation(rop.CALL, args, result, self),
            ResOperation(rop.GUARD_NO_EXCEPTION, [], None,
                         descr=BasicFailDescr()),
            ResOperation(rop.FINISH, result_list, None,

src/s/y/Sypy-HEAD/jit/metainterp/optimizeopt/fficall.py   Sypy(Download)
from pypy.jit.codewriter.effectinfo import EffectInfo
from pypy.jit.metainterp.optimizeopt.optimizer import Optimization
from pypy.jit.metainterp.optimizeopt.util import make_dispatcher_method
from pypy.jit.metainterp.resoperation import rop, ResOperation
from pypy.rlib import clibffi, libffi
            argval = self.getvalue(push_op.getarg(2))
            arglist.append(argval.get_key_box())
        newop = ResOperation(rop.CALL_RELEASE_GIL, arglist, op.result,
                             descr=funcinfo.descr)
        self.commit_optimization()
            arglist.append(newval.force_box(self.optimizer))
        #
        newop = ResOperation(opnum, arglist, op.result, descr=descr)
        return [newop]
 
            assert False
        return [
            ResOperation(opnum, arglist, op.result, descr=descr),
        ]
 

  1 | 2 | 3 | 4 | 5  Next