[pypy-svn] r28555 - in pypy/dist/pypy: interpreter module/stackless

pedronis at codespeak.net pedronis at codespeak.net
Thu Jun 8 20:25:48 CEST 2006


Author: pedronis
Date: Thu Jun  8 20:25:34 2006
New Revision: 28555

Modified:
   pypy/dist/pypy/interpreter/pyframe.py
   pypy/dist/pypy/module/stackless/coroutine.py
Log:
move the resume_point in eval before the dispatch_translated, this is what we want and is legitimate
beceause dispatch always raises, there's a test in test_resume_point that should exemplify this case.



Modified: pypy/dist/pypy/interpreter/pyframe.py
==============================================================================
--- pypy/dist/pypy/interpreter/pyframe.py	(original)
+++ pypy/dist/pypy/interpreter/pyframe.py	Thu Jun  8 20:25:34 2006
@@ -198,10 +198,9 @@
                     try:
                         try:
                             if we_are_translated():
-                                try:
-                                    self.dispatch_translated(executioncontext)
-                                finally:
-                                    rstack.resume_point("eval", self)
+                                 # always raising, put the resume point just before!
+                                 rstack.resume_point("eval", self, executioncontext)
+                                 self.dispatch_translated(executioncontext)
                             else:
                                 self.dispatch(executioncontext)
                         # catch asynchronous exceptions and turn them

Modified: pypy/dist/pypy/module/stackless/coroutine.py
==============================================================================
--- pypy/dist/pypy/module/stackless/coroutine.py	(original)
+++ pypy/dist/pypy/module/stackless/coroutine.py	Thu Jun  8 20:25:34 2006
@@ -164,8 +164,8 @@
             assert isinstance(frame, PyFrame)
             # rstack.resume_point("evalframe", self, executioncontext, returns=result)
             evalframe_frame = resume_state_create(chain, "evalframe", frame, ec)
-            # rstack.resume_point("eval", self)
-            eval_frame = resume_state_create(evalframe_frame, "eval", frame)
+            # rstack.resume_point("eval", self, executioncontext)
+            eval_frame = resume_state_create(evalframe_frame, "eval", frame, ec)
             # rstack.resume_point("dispatch_call", self, code, ec)
             code = frame.getcode().co_code
             dispatch_call_frame = resume_state_create(eval_frame, "dispatch_call", frame, code, ec)



More information about the Pypy-commit mailing list