[pypy-svn] r51768 - pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test

tverwaes at codespeak.net tverwaes at codespeak.net
Fri Feb 22 04:53:22 CET 2008


Author: tverwaes
Date: Fri Feb 22 04:53:19 2008
New Revision: 51768

Modified:
   pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_shadow.py
Log:
adding stack-test + weirdness comment


Modified: pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_shadow.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_shadow.py	(original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/lang/smalltalk/test/test_shadow.py	Fri Feb 22 04:53:19 2008
@@ -97,8 +97,16 @@
     # XXX
     w_object.store(constants.MTHDCTX_RECEIVER_MAP, '???')
     w_object.store(constants.MTHDCTX_RECEIVER, 'receiver')
-    w_object.store(constants.MTHDCTX_TEMP_FRAME_START,
-                   utility.wrap_int(constants.MTHDCTX_TEMP_FRAME_START))
+
+    # XXX Might want to check the realness of the next assumption,
+    # XXX made by hooking into the suspended thread of the image.
+    # XXX it seems the only possibility, and using this assumption
+    # XXX it actually runs...
+    # Weirdly enough, undependant from the size of the tempsize and
+    # argsize, the stackpointer can point to anything starting from
+    # the temp_frame_start. That's why stacks always print all elements
+    # including possible "temps or args"
+    w_object.store(constants.MTHDCTX_TEMP_FRAME_START, 'el')
     return w_object
 
 def test_methodcontext():
@@ -123,6 +131,7 @@
     w_object.store(idx + 2, 'g')
     w_object.store(idx + 3, 'h')
     assert s_object.top() == 'h'
+    assert s_object.stack() == ['el', 'f', 'g', 'h' ]
     s_object.push('i')
     assert s_object.top() == 'i'
     assert s_object.peek(1) == 'h'
@@ -197,4 +206,3 @@
     s_object.add_last_link(w_last)
     assert s_object.w_firstlink() == w_first
     assert s_object.w_lastlink() == w_last
-    



More information about the Pypy-commit mailing list