[pypy-svn] r69495 - in pypy/branch/faster-raise/pypy/interpreter: . test

arigo at codespeak.net arigo at codespeak.net
Sat Nov 21 18:36:23 CET 2009


Author: arigo
Date: Sat Nov 21 18:36:22 2009
New Revision: 69495

Modified:
   pypy/branch/faster-raise/pypy/interpreter/executioncontext.py
   pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py
Log:
(pedronis, arigo)
Yet Another Fix For The Day.  With test.


Modified: pypy/branch/faster-raise/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/executioncontext.py	(original)
+++ pypy/branch/faster-raise/pypy/interpreter/executioncontext.py	Sat Nov 21 18:36:22 2009
@@ -142,6 +142,7 @@
             curtopframe = self.gettopframe()
             assert curtopframe is not None
             curtopframe.f_forward = frame
+            frame.f_back_is_correct = False
         else:
             self.top_real_frame = frame
 

Modified: pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py
==============================================================================
--- pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py	(original)
+++ pypy/branch/faster-raise/pypy/interpreter/test/test_executioncontext.py	Sat Nov 21 18:36:22 2009
@@ -845,3 +845,12 @@
         ec.force_frame_chain()
         assert frame2._f_forward is None    # because we just forced
         assert frame._f_forward is None
+
+    def test_rechain_frame(self):
+        # test rechaining a frame, as is done with generators
+        ec, frame, frame2 = self.enter_two_jitted_levels()
+        ec.force_frame_chain()
+        ec._unchain(frame2)
+        ec._chain(frame2)
+        assert frame._f_forward is frame2
+        assert not frame2.f_back_is_correct



More information about the Pypy-commit mailing list