[pypy-svn] r10087 - pypy/dist/pypy/interpreter

ac at codespeak.net ac at codespeak.net
Tue Mar 22 21:09:34 CET 2005


Author: ac
Date: Tue Mar 22 21:09:34 2005
New Revision: 10087

Modified:
   pypy/dist/pypy/interpreter/executioncontext.py
   pypy/dist/pypy/interpreter/pyframe.py
Log:
Minor refactoring

Modified: pypy/dist/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/dist/pypy/interpreter/executioncontext.py	(original)
+++ pypy/dist/pypy/interpreter/executioncontext.py	Tue Mar 22 21:09:34 2005
@@ -57,7 +57,7 @@
 
     def return_trace(self, frame, w_retval):
         "Trace the return from a function"
-        self._trace(self.framestack.top(), 'return', w_retval)
+        self._trace(frame, 'return', w_retval)
 
     def bytecode_trace(self, frame):
         "Trace function called before each bytecode."
@@ -117,12 +117,11 @@
         else:
             frame.instr_ub = sys.maxint
 
-    def exception_trace(self, operationerr):
+    def exception_trace(self, frame, operationerr):
         "Trace function called upon OperationError."
         operationerr.record_interpreter_traceback()
         exc_info = self.sys_exc_info()
-        frame = self.framestack.top()
-        self._trace(self.framestack.top(), 'exception',
+        self._trace(frame, 'exception',
                         exc_info)
         #operationerr.print_detailed_traceback(self.space)
 

Modified: pypy/dist/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyframe.py	(original)
+++ pypy/dist/pypy/interpreter/pyframe.py	Tue Mar 22 21:09:34 2005
@@ -108,7 +108,7 @@
                     except OperationError, e:
                         pytraceback.record_application_traceback(
                             self.space, e, self, self.last_instr)
-                        executioncontext.exception_trace(e)
+                        executioncontext.exception_trace(self, e)
                         # convert an OperationError into a control flow
                         # exception
                         import sys



More information about the Pypy-commit mailing list