[pypy-svn] r65055 - in pypy/branch/pyjitpl5/pypy: jit/tl rpython/test

antocuni at codespeak.net antocuni at codespeak.net
Tue May 5 14:13:04 CEST 2009


Author: antocuni
Date: Tue May  5 14:13:04 2009
New Revision: 65055

Modified:
   pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py
   pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_child.py
   pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py
   pypy/branch/pyjitpl5/pypy/rpython/test/test_llinterp.py
Log:
- add autopath to pypyjit.py

- add a simple loop to pypyjit_demo.py

- use optimize.py, it produces kind of good code for simple_loop()

- fix test_llinterp as the new conftest doesn't have the option 'view'. I'm
  sure there is a better way to do it, but I don't know how :-/



Modified: pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit.py	Tue May  5 14:13:04 2009
@@ -2,6 +2,7 @@
 A file that invokes translation of PyPy with the JIT enabled.
 """
 
+import autopath
 import py, os
 
 from pypy.objspace.std import Space

Modified: pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_child.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_child.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_child.py	Tue May  5 14:13:04 2009
@@ -1,7 +1,8 @@
 from pypy.conftest import option
 from pypy.rpython.lltypesystem import lltype
 from pypy.jit.metainterp import warmspot
-from pypy.jit.metainterp.simple_optimize import Optimizer
+#from pypy.jit.metainterp.simple_optimize import Optimizer
+from pypy.jit.metainterp import optimize as Optimizer
 from pypy.module.pypyjit.policy import PyPyJitPolicy
 
 # Current output: http://paste.pocoo.org/show/106540/

Modified: pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/tl/pypyjit_demo.py	Tue May  5 14:13:04 2009
@@ -4,8 +4,19 @@
     __import__('test.' + TESTNAME)
     print "---ending 1---"
 
+def simple_loop():
+    print "simple loop"
+    i = 0
+    N = 100
+    step = 3
+    while i < N:
+        i = i + step
+    print i
+
+
 try:
-    do()
+    #do()
+    simple_loop()
     print "---ending 2---"
 except BaseException, e:
     print "---ending 0---"

Modified: pypy/branch/pyjitpl5/pypy/rpython/test/test_llinterp.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/rpython/test/test_llinterp.py	(original)
+++ pypy/branch/pyjitpl5/pypy/rpython/test/test_llinterp.py	Tue May  5 14:13:04 2009
@@ -45,7 +45,7 @@
     a = t.buildannotator(policy=policy)
     timelog("annotating", a.build_types, func, argtypes)
     if viewbefore == 'auto':
-        viewbefore = conftest.option.view
+        viewbefore = getattr(conftest.option, 'view', False)
     if viewbefore:
         a.simplify()
         t.view()
@@ -104,7 +104,7 @@
         if len(_lastinterpreted) >= 4: 
             del _tcache[_lastinterpreted.pop(0)]
     if view == 'auto':
-        view = conftest.option.view
+        view = getattr(conftest.option, 'view', False)
     if view:
         t.view()
     return interp, graph



More information about the Pypy-commit mailing list