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

fijal at codespeak.net fijal at codespeak.net
Fri May 1 00:07:52 CEST 2009


Author: fijal
Date: Fri May  1 00:07:51 2009
New Revision: 64893

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/compile.py
Log:
respect the DEBUG flag. I think this is the first JIT that can be made
not print anything at all :)


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/compile.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/compile.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/compile.py	Fri May  1 00:07:51 2009
@@ -88,6 +88,8 @@
 # ____________________________________________________________
 
 def compile_fresh_loop(metainterp, old_loops, greenkey, start):
+    from pypy.jit.metainterp.pyjitpl import DEBUG
+
     history = metainterp.history
     loop = create_empty_loop(metainterp)
     loop.greenkey = greenkey
@@ -101,7 +103,7 @@
     old_loop = metainterp_sd.optimize_loop(metainterp_sd.options, old_loops,
                                            loop, metainterp.cpu)
     if old_loop is not None:
-        if we_are_translated():
+        if we_are_translated() and DEBUG > 0:
             debug_print("reusing old loop")
         return old_loop
     history.source_link = loop
@@ -119,7 +121,9 @@
             loop._ignore_during_counting = True
         log.info("compiled new " + type)
     else:
-        debug_print("compiled new " + type)
+        from pypy.jit.metainterp.pyjitpl import DEBUG
+        if DEBUG > 0:
+            debug_print("compiled new " + type)
 
 # ____________________________________________________________
 



More information about the Pypy-commit mailing list