[pypy-commit] pypy default: log the cause of InvalidLoop

fijal noreply at buildbot.pypy.org
Sun Apr 29 12:31:56 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r54801:20af87d3217b
Date: 2012-04-29 12:31 +0200
http://bitbucket.org/pypy/pypy/changeset/20af87d3217b/

Log:	log the cause of InvalidLoop

diff --git a/pypy/jit/metainterp/jitexc.py b/pypy/jit/metainterp/jitexc.py
--- a/pypy/jit/metainterp/jitexc.py
+++ b/pypy/jit/metainterp/jitexc.py
@@ -12,7 +12,6 @@
     """
     _go_through_llinterp_uncaught_ = True     # ugh
 
-
 def _get_standard_error(rtyper, Class):
     exdata = rtyper.getexceptiondata()
     clsdef = rtyper.annotator.bookkeeper.getuniqueclassdef(Class)
diff --git a/pypy/jit/metainterp/optimize.py b/pypy/jit/metainterp/optimize.py
--- a/pypy/jit/metainterp/optimize.py
+++ b/pypy/jit/metainterp/optimize.py
@@ -5,3 +5,9 @@
     """Raised when the optimize*.py detect that the loop that
     we are trying to build cannot possibly make sense as a
     long-running loop (e.g. it cannot run 2 complete iterations)."""
+
+    def __init__(self, msg='?'):
+        debug_start("jit-abort")
+        debug_print(msg)
+        debug_stop("jit-abort")
+        self.msg = msg


More information about the pypy-commit mailing list