[pypy-svn] r52901 - in pypy/branch/jit-hotpath/pypy: jit/rainbow/test translator

arigo at codespeak.net arigo at codespeak.net
Tue Mar 25 13:15:12 CET 2008


Author: arigo
Date: Tue Mar 25 13:15:12 2008
New Revision: 52901

Modified:
   pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hotpath.py
   pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hp_virtualizable.py
   pypy/branch/jit-hotpath/pypy/translator/driver.py
Log:
fwiw the tests still pass when applying
graphopt.simplify_virtualizable_accesses().


Modified: pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hotpath.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hotpath.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hotpath.py	Tue Mar 25 13:15:12 2008
@@ -55,7 +55,7 @@
 
 class HotPathTest(test_interpreter.InterpretationTest):
     type_system = 'lltype'
-
+    simplify_virtualizable_accesses = False
 
     def interpret(self, main, ll_values, opt_consts=[], **kwds):
         py.test.skip("old-style test, port me")
@@ -78,6 +78,9 @@
                                        jitdrivercls,
                                        self.translate_support_code)
         self.hotrunnerdesc.rewrite_all()
+        if self.simplify_virtualizable_accesses:
+            from pypy.jit.rainbow import graphopt
+            graphopt.simplify_virtualizable_accesses(self.writer)
         if small and conftest.option.view:
             self.rtyper.annotator.translator.view()
 

Modified: pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hp_virtualizable.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hp_virtualizable.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/rainbow/test/test_hp_virtualizable.py	Tue Mar 25 13:15:12 2008
@@ -1093,6 +1093,7 @@
 
 class TestVirtualizableImplicit(test_hotpath.HotPathTest):
     type_system = "lltype"
+    simplify_virtualizable_accesses = True
 
     def timeshift_from_portal(self, *args, **kwargs):
         py.test.skip("port me")

Modified: pypy/branch/jit-hotpath/pypy/translator/driver.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/translator/driver.py	(original)
+++ pypy/branch/jit-hotpath/pypy/translator/driver.py	Tue Mar 25 13:15:12 2008
@@ -444,6 +444,8 @@
                                           writer, jitdrivercls,
                                           translate_support_code=True)
             hotrunnerdesc.rewrite_all()
+            from pypy.jit.rainbow import graphopt
+            graphopt.simplify_virtualizable_accesses(writer)
         else:
             from pypy.jit.rainbow.portal import PortalRewriter
             rewriter = PortalRewriter(self.hannotator, rtyper, RGenOp,



More information about the Pypy-commit mailing list