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

arigo at codespeak.net arigo at codespeak.net
Sat Mar 7 10:23:39 CET 2009


Author: arigo
Date: Sat Mar  7 10:23:38 2009
New Revision: 62683

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
Log:
Introduce an exception that makes crashes more explicit.


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/history.py	Sat Mar  7 10:23:38 2009
@@ -367,6 +367,8 @@
     def __init__(self, cpu):
         self.cpu = cpu
         self.operations = []
+    def record(self, opnum, argboxes, resbox, descr=0):
+        raise NotImplementedError
 
 class History(RunningMatcher):
     def record(self, opnum, argboxes, resbox, descr=0):
@@ -444,6 +446,10 @@
             graphs.append(graph)
         ResOpGraphPage(graphs, errmsg, highlightops).display()
 
+
+class CrashInJIT(Exception):
+    pass
+
 # ----------------------------------------------------------------
 
 class Options:

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/warmspot.py	Sat Mar  7 10:23:38 2009
@@ -142,7 +142,7 @@
                 import sys, pdb; pdb.post_mortem(sys.exc_info()[2])
             else:
                 print e
-            raise AssertionError("crash in JIT")
+            raise history.CrashInJIT("crash in JIT")
         crash_in_jit._dont_inline_ = True
 
         def maybe_enter_jit(*args):



More information about the Pypy-commit mailing list