[pypy-svn] r34181 - pypy/dist/pypy/jit/codegen/llgraph

pedronis at codespeak.net pedronis at codespeak.net
Sat Nov 4 16:17:52 CET 2006


Author: pedronis
Date: Sat Nov  4 16:17:51 2006
New Revision: 34181

Modified:
   pypy/dist/pypy/jit/codegen/llgraph/llimpl.py
Log:
add sanity check



Modified: pypy/dist/pypy/jit/codegen/llgraph/llimpl.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/llgraph/llimpl.py	(original)
+++ pypy/dist/pypy/jit/codegen/llgraph/llimpl.py	Sat Nov  4 16:17:51 2006
@@ -153,7 +153,12 @@
             if example == 0:
                 example = type(example)(1)     # to avoid ZeroDivisionError
         examples.append(example)
-    result = op.fold(*examples)
+    try:
+        result = op.fold(*examples)
+    except (KeyboardInterrupt, SystemExit):
+        raise
+    except Exception, e:
+        assert 0, "failed to guess the type of %s: %s" % (opname, e)
     return lltype.typeOf(result)
 
 def gencallableconst(name, graph, gv_FUNCTYPE):



More information about the Pypy-commit mailing list