Author: arigo
Date: Sat Nov 21 12:11:26 2009
New Revision: 69487
Modified:
pypy/trunk/pypy/interpreter/executioncontext.py
pypy/trunk/pypy/interpreter/test/test_executioncontext.py
Log:
Improve the test, and see it failing. For now, no fix; I am
trying to fix this in the branch/faster-raise, because it requires
a bit deeper changes.
Modified: pypy/trunk/pypy/interpreter/executioncontext.py
==============================================================================
--- pypy/trunk/pypy/interpreter/executioncontext.py (original)
+++ pypy/trunk/pypy/interpreter/executioncontext.py Sat Nov 21 12:11:26 2009
@@ -71,6 +71,8 @@
def _init_frame_chain(self):
# 'some_frame' points to any frame from this thread's frame stack
# (although in general it should point to the top one).
+ # XXX not true: some_frame must point to a frame from which we can
+ # reach the top frame by following the chain of f_forward
self.some_frame = None
self.framestackdepth = 0
Modified: pypy/trunk/pypy/interpreter/test/test_executioncontext.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_executioncontext.py (original)
+++ pypy/trunk/pypy/interpreter/test/test_executioncontext.py Sat Nov 21 12:11:26 2009
@@ -575,7 +575,7 @@
assert frame.f_back_some is None
assert ec.gettopframe() is None
-
+ @py.test.mark.xfail
def test_frame_chain_jitted_forced(self):
ec = self.EC()
@@ -593,8 +593,10 @@
# recursive enter/leave seen by the jit
frame3 = self.Frame(ec)
ec._chain(frame3)
+ assert ec.gettopframe() is frame3
res = frame3.force_f_back()
assert res is frame2
+ assert ec.gettopframe() is frame3
assert frame3.f_back() is frame2
ec._unchain(frame3)