[pypy-svn] r63514 - in pypy/branch/optimize-refactoring/pypy/jit/metainterp: . test

fijal at codespeak.net fijal at codespeak.net
Thu Apr 2 04:09:13 CEST 2009


Author: fijal
Date: Thu Apr  2 04:09:12 2009
New Revision: 63514

Added:
   pypy/branch/optimize-refactoring/pypy/jit/metainterp/simple_optimize.py   (contents, props changed)
   pypy/branch/optimize-refactoring/pypy/jit/metainterp/test/test_loop_dummy.py   (contents, props changed)
Log:
missing files to the previous checkin


Added: pypy/branch/optimize-refactoring/pypy/jit/metainterp/simple_optimize.py
==============================================================================
--- (empty file)
+++ pypy/branch/optimize-refactoring/pypy/jit/metainterp/simple_optimize.py	Thu Apr  2 04:09:12 2009
@@ -0,0 +1,14 @@
+
+""" Simplified optimize.py
+"""
+
+def optimize_loop(options, old_loops, loop, cpu=None):
+    if old_loops:
+        return old_loops[0]
+    else:
+        return None
+
+def optimize_bridge(options, old_loops, loop, cpu=None):
+    return old_loops[0]
+
+

Added: pypy/branch/optimize-refactoring/pypy/jit/metainterp/test/test_loop_dummy.py
==============================================================================
--- (empty file)
+++ pypy/branch/optimize-refactoring/pypy/jit/metainterp/test/test_loop_dummy.py	Thu Apr  2 04:09:12 2009
@@ -0,0 +1,12 @@
+
+from pypy.jit.metainterp.test import test_loop
+from pypy.jit.metainterp.warmspot import ll_meta_interp
+from pypy.jit.metainterp.simple_optimize import optimize_loop, optimize_bridge
+
+class Optimizer:
+    optimize_loop = staticmethod(optimize_loop)
+    optimize_bridge = staticmethod(optimize_bridge)
+
+class TestLoopDummy(test_loop.TestLoop):
+    def meta_interp(self, func, args, **kwds):
+        return ll_meta_interp(func, args, optimizer=Optimizer, **kwds)



More information about the Pypy-commit mailing list