[pypy-svn] r62340 - pypy/branch/pyjitpl5/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Mon Mar 2 12:06:08 CET 2009


Author: arigo
Date: Mon Mar  2 12:06:07 2009
New Revision: 62340

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/support.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
Log:
Undo another small bit of r62309 and do it "right".


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/support.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/support.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/support.py	Mon Mar  2 12:06:07 2009
@@ -4,7 +4,7 @@
 from pypy.rpython.lltypesystem import rdict, rstr
 from pypy.rpython.llinterp import LLInterpreter
 from pypy.rpython.extregistry import ExtRegistryEntry
-from pypy.translator.simplify import get_funcobj, checkgraph, simplify_graph
+from pypy.translator.simplify import get_funcobj
 from pypy.translator.unsimplify import split_block
 from pypy.objspace.flow.model import Constant
 from pypy import conftest
@@ -52,7 +52,6 @@
     """Find the block with 'jit_merge_point' and split just before,
     making sure the input args are in the canonical order.
     """
-    origstartblock = graph.startblock
     # split the block just before the jit_merge_point()
     if portalopindex > 0:
         link = split_block(None, portalblock, portalopindex)
@@ -65,12 +64,6 @@
     livevars = [v for v in portalop.args[2:]
                   if v.concretetype is not lltype.Void]
     link = split_block(None, portalblock, 0, livevars)
-    if origstartblock != portalblock:
-        portalblock.isstartblock = True
-        origstartblock.isstartblock = False
-    graph.startblock = portalblock
-    simplify_graph(graph)
-    checkgraph(graph)
     return link.target
 
 def maybe_on_top_of_llinterp(rtyper, fnptr):

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	Mon Mar  2 12:06:07 2009
@@ -117,8 +117,11 @@
         self.jit_merge_point_pos = find_jit_merge_point(graphs)
         graph, block, pos = self.jit_merge_point_pos
         graph = copygraph(graph)
+        graph.startblock.isstartblock = False
         graph.startblock = support.split_before_jit_merge_point(
             *find_jit_merge_point([graph]))
+        graph.startblock.isstartblock = True
+        checkgraph(graph)
         for v in graph.getargs():
             assert isinstance(v, Variable)
         assert len(dict.fromkeys(graph.getargs())) == len(graph.getargs())



More information about the Pypy-commit mailing list