[pypy-svn] r63434 - in pypy/branch/pyjitpl5-loop/pypy/jit: backend/llgraph metainterp

arigo at codespeak.net arigo at codespeak.net
Mon Mar 30 13:10:31 CEST 2009


Author: arigo
Date: Mon Mar 30 13:10:30 2009
New Revision: 63434

Modified:
   pypy/branch/pyjitpl5-loop/pypy/jit/backend/llgraph/runner.py
   pypy/branch/pyjitpl5-loop/pypy/jit/metainterp/optimize.py
Log:
Clean up (broken checkin)


Modified: pypy/branch/pyjitpl5-loop/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-loop/pypy/jit/backend/llgraph/runner.py	(original)
+++ pypy/branch/pyjitpl5-loop/pypy/jit/backend/llgraph/runner.py	Mon Mar 30 13:10:30 2009
@@ -93,20 +93,6 @@
         the conditional jump on this guard to now execute the given bridge.
         """
         c = llimpl.compile_restart(fail_op._fail_position)
-        var2index = self._get_loop_args(c, bridge)
-        self._compile_branch(c, bridge.operations, var2index, rop.JUMP)
-        return c
-
-    def _get_loop_args(self, c, loop):
-        var2index = self._get_loop_args(c, loop)
-        self._compile_branch(c, loop.operations, var2index, rop.JUMP)
-
-    def compile_bridge(self, fail_op, bridge):
-        """Like compile_loop, but produce the bridge operations going from
-        the guard that precedes the given FAIL operation.  It should patch
-        the conditional jump on this guard to now execute the given bridge.
-        """
-        c = llimpl.compile_restart(fail_op._fail_position)
         bridge._compiled_version = c
         var2index = self._get_loop_args(c, bridge)
         self._compile_branch(c, bridge.operations, var2index, rop.JUMP)

Modified: pypy/branch/pyjitpl5-loop/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5-loop/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5-loop/pypy/jit/metainterp/optimize.py	Mon Mar 30 13:10:30 2009
@@ -798,58 +798,6 @@
                 return False
         return True
 
-    def _patch(self, origargs, newargs):
-        i = 0
-        res = []
-        for arg in newargs:
-            if arg is None:
-                res.append(origargs[i])
-                i += 1
-            else:
-                res.append(arg)
-        return res
-
-    def _patch_loop(self, operations, inpargs, rebuild_ops, loop):
-        for op in operations:
-            if op.is_guard():
-                if op.suboperations[-1].opnum == rop.FAIL:
-                    op.suboperations = (op.suboperations[:-1] + rebuild_ops +
-                                        [op.suboperations[-1]])
-                else:
-                    self._patch_loop(op.suboperations, inpargs, rebuild_ops,
-                                     loop)
-        jump = operations[-1]
-        if jump.opnum == rop.JUMP and jump.jump_target is loop:
-            jump.args = self._patch(jump.args, inpargs)
-
-    def update_loop(self, offsets, loop):
-        j = 0
-        new_inputargs = []
-        prev_ofs = 0
-        rebuild_ops = []
-        memo = {}
-        for i in range(len(offsets)):
-            for specnode, descr, parentnode, rel_ofs, node in offsets[i]:
-                while parentnode.source != loop.inputargs[j]:
-                    j += 1
-                ofs = j + rel_ofs + 1
-                new_inputargs.extend([None] * (ofs - prev_ofs))
-                prev_ofs = ofs
-                boxlist = []
-                specnode.expand_boxlist(node, boxlist)
-                new_inputargs.extend(boxlist)
-                box = self.prepare_rebuild_ops(node, rebuild_ops, memo)
-                if (parentnode.cls and
-                    isinstance(parentnode.cls.source, FixedList)):
-                    rebuild_ops.append(ResOperation(rop.SETARRAYITEM_GC,
-                      [parentnode.source, descr, box], None,
-                      parentnode.cls.source.arraydescr))
-                else:
-                    rebuild_ops.append(ResOperation(rop.SETFIELD_GC,
-                      [parentnode.source, box], None, descr))
-        new_inputargs.extend([None] * (len(loop.inputargs) - prev_ofs))
-        loop.inputargs = self._patch(loop.inputargs, new_inputargs)
-        self._patch_loop(loop.operations, new_inputargs, rebuild_ops, loop)
 
 def get_in_list(dict, boxes_or_consts):
     result = []



More information about the Pypy-commit mailing list