[pypy-svn] r37925 - in pypy/branch/jit-virtual-world/pypy/jit: goal timeshifter timeshifter/test

pedronis at codespeak.net pedronis at codespeak.net
Sun Feb 4 22:05:29 CET 2007


Author: pedronis
Date: Sun Feb  4 22:05:26 2007
New Revision: 37925

Modified:
   pypy/branch/jit-virtual-world/pypy/jit/goal/jitstep.py
   pypy/branch/jit-virtual-world/pypy/jit/timeshifter/hrtyper.py
   pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_portal.py
   pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_timeshift.py
Log:
copy the graphs from the hint annotator translator to the base one in timeshifting specialize



Modified: pypy/branch/jit-virtual-world/pypy/jit/goal/jitstep.py
==============================================================================
--- pypy/branch/jit-virtual-world/pypy/jit/goal/jitstep.py	(original)
+++ pypy/branch/jit-virtual-world/pypy/jit/goal/jitstep.py	Sun Feb  4 22:05:26 2007
@@ -62,9 +62,6 @@
     hrtyper = HintRTyper(ha, t.rtyper, RGenOp)
     origportalgraph = graphof(t, PORTAL)
     hrtyper.specialize(origportalgraph=origportalgraph, view=False)
-    for graph in ha.translator.graphs:
-        checkgraph(graph)
-        t.graphs.append(graph)
         
     # XXX temp
     drv.source()

Modified: pypy/branch/jit-virtual-world/pypy/jit/timeshifter/hrtyper.py
==============================================================================
--- pypy/branch/jit-virtual-world/pypy/jit/timeshifter/hrtyper.py	(original)
+++ pypy/branch/jit-virtual-world/pypy/jit/timeshifter/hrtyper.py	Sun Feb  4 22:05:26 2007
@@ -213,6 +213,12 @@
             self.log.event("portal has now %d blocks" % n)
             self.rewire_portal()
 
+        # move the timeshifted graphs into the original translator
+        base_translator = self.annotator.base_translator
+        for graph in self.annotator.translator.graphs:
+            flowmodel.checkgraph(graph)
+            base_translator.graphs.append(graph)
+
     # remember a shared pointer for the portal graph,
     # so that it can be later patched by rewire_portal.
     # this pointer is going to be used by the resuming logic

Modified: pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_portal.py
==============================================================================
--- pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_portal.py	(original)
+++ pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_portal.py	Sun Feb  4 22:05:26 2007
@@ -5,7 +5,7 @@
 from pypy.jit.timeshifter.test.test_timeshift import P_NOVIRTUAL, StopAtXPolicy
 from pypy.jit.timeshifter.test.test_vlist import P_OOPSPEC
 from pypy.rpython.llinterp import LLInterpreter
-from pypy.objspace.flow.model import checkgraph, summary
+from pypy.objspace.flow.model import  summary
 from pypy.rlib.objectmodel import hint
 from pypy.jit.codegen.llgraph.rgenop import RGenOp as LLRGenOp
 
@@ -64,10 +64,6 @@
         self.hrtyper.specialize(origportalgraph=origportalgraph,
                            view = conftest.option.view and self.small)
 
-        for graph in ha.translator.graphs:
-            checkgraph(graph)
-            t.graphs.append(graph)
-
         if conftest.option.view and self.small:
             t.view()
         self.postprocess_timeshifting()

Modified: pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_timeshift.py
==============================================================================
--- pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_timeshift.py	(original)
+++ pypy/branch/jit-virtual-world/pypy/jit/timeshifter/test/test_timeshift.py	Sun Feb  4 22:05:26 2007
@@ -13,7 +13,6 @@
 from pypy.rpython.module.support import LLSupport
 from pypy.annotation import model as annmodel
 from pypy.rpython.llinterp import LLInterpreter, LLException
-from pypy.objspace.flow.model import checkgraph
 from pypy.translator.backendopt.inline import auto_inlining
 from pypy import conftest
 from pypy.jit.conftest import Benchmark
@@ -105,13 +104,9 @@
         # make the timeshifted graphs
         hrtyper = HintRTyper(ha, rtyper, self.RGenOp)
         hrtyper.specialize(view = conftest.option.view and self.small)
-
         fresh_jitstate = hrtyper.ll_fresh_jitstate
         finish_jitstate = hrtyper.ll_finish_jitstate
         t = rtyper.annotator.translator
-        for graph in ha.translator.graphs:
-            checkgraph(graph)
-            t.graphs.append(graph)
 
         # make an interface to the timeshifted graphs:
         #


More information about the pypy-svn mailing list