[pypy-svn] r63445 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Tue Mar 31 14:14:24 CEST 2009


Author: arigo
Date: Tue Mar 31 14:14:22 2009
New Revision: 63445

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
Log:
Print more logs.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	Tue Mar 31 14:14:22 2009
@@ -800,7 +800,7 @@
         return resbox
     execute_and_record._annspecialcase_ = 'specialize:arg(1)'
 
-    def interpret(self):
+    def _interpret(self):
         # Execute the frames forward until we raise a DoneWithThisFrame,
         # a ContinueRunningNormally, or a GenerateMergePoint exception.
         if isinstance(self.history, history.BlackHole):
@@ -820,6 +820,18 @@
             else:
                 debug_print('~~~ LEAVE', text)
 
+    def interpret(self):
+        if we_are_translated():
+            self._interpret()
+        else:
+            try:
+                self._interpret()
+            except:
+                import sys
+                if sys.exc_info()[0] is not None:
+                    history.log.info(sys.exc_info()[0].__name__)
+                raise
+
     def compile_and_run_once(self, *args):
         orig_boxes = self.initialize_state_from_start(*args)
         try:
@@ -858,7 +870,8 @@
             box1 = original_boxes[i]
             box2 = live_arg_boxes[i]
             if not box1.equals(box2):
-                # not a valid loop
+                if not we_are_translated():
+                    history.log.info('not a valid loop at all')
                 raise self.ContinueRunningNormally(live_arg_boxes)
         self.history.inputargs = original_boxes[num_green_args:]
         greenkey = original_boxes[:num_green_args]
@@ -866,6 +879,8 @@
         self.history.record(rop.JUMP, live_arg_boxes[num_green_args:], None)
         loop = compile_new_loop(self, old_loops)
         if not loop:
+            if not we_are_translated():
+                history.log.info('compile_new_loop() returned None')
             raise self.ContinueRunningNormally(live_arg_boxes)
         if not we_are_translated():
             loop._call_history = self._debug_history
@@ -879,10 +894,14 @@
             old_loops = self.compiled_merge_points[greenkey]
         except KeyError:
             target_loop = None
+            if not we_are_translated():
+                history.log.info('no loop seen so far with this green key')
         else:
             self.history.record(rop.JUMP, live_arg_boxes[num_green_args:],
                                 None)
             target_loop = compile_new_bridge(self, old_loops, key)
+            if not we_are_translated() and target_loop is None:
+                history.log.info('compile_new_bridge() returned None')
         if target_loop is None:
             raise self.ContinueRunningNormally(live_arg_boxes)
         if not we_are_translated():



More information about the Pypy-commit mailing list