Author: Alex Gaynor <[email protected]>
Branch: jit-sys-exc-info
Changeset: r60832:c16f1d159c6e
Date: 2013-02-02 16:13 -0800
http://bitbucket.org/pypy/pypy/changeset/c16f1d159c6e/
Log: Unroll this. Not a generally safe solution, but demonstrates the
concept.
diff --git a/pypy/interpreter/executioncontext.py
b/pypy/interpreter/executioncontext.py
--- a/pypy/interpreter/executioncontext.py
+++ b/pypy/interpreter/executioncontext.py
@@ -157,9 +157,12 @@
self._trace(frame, 'exception', None, operationerr)
#operationerr.print_detailed_traceback(self.space)
- def sys_exc_info(self): # attn: the result is not the wrapped
sys.exc_info() !!!
- """Implements sys.exc_info().
- Return an OperationError instance or None."""
+ @jit.unroll_safe
+ def sys_exc_info(self):
+ """
+ Implements sys.exc_info(). It does not have the same return type as
+ sys.exc_info(). Return an OperationError instance or None.
+ """
frame = self.gettopframe_nohidden()
while frame:
if frame.last_exception is not None:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit