[pypy-svn] r7302 - pypy/trunk/src/pypy/translator
mgedmin at codespeak.net
mgedmin at codespeak.net
Tue Nov 16 18:38:23 CET 2004
Author: mgedmin
Date: Tue Nov 16 18:38:22 2004
New Revision: 7302
Modified:
pypy/trunk/src/pypy/translator/annrpython.py
Log:
Store the tracebacks to show the reason why some block were left blocked
in an attribute of the annotator.
Modified: pypy/trunk/src/pypy/translator/annrpython.py
==============================================================================
--- pypy/trunk/src/pypy/translator/annrpython.py (original)
+++ pypy/trunk/src/pypy/translator/annrpython.py Tue Nov 16 18:38:22 2004
@@ -23,6 +23,7 @@
self.pendingblocks = [] # list of (fn, block, list-of-SomeValues-args)
self.bindings = {} # map Variables to SomeValues
self.annotated = {} # set of blocks already seen
+ self.why_not_annotated = {} # {block: traceback_where_BlockedInference_was_raised}
self.notify = {} # {block: {factory-to-invalidate-when-done}}
self.bindingshistory = {}# map Variables to lists of SomeValues
self.bookkeeper = Bookkeeper(self)
@@ -254,6 +255,7 @@
#import traceback, sys
#traceback.print_tb(sys.exc_info()[2])
self.annotated[block] = False # failed, hopefully temporarily
+ self.why_not_annotated[block] = sys.exc_info()[2]
except Exception, e:
# hack for debug tools only
if not hasattr(e, '__annotator_block'):
More information about the Pypy-commit
mailing list