[pypy-svn] r47961 - in pypy/dist/pypy/lang/smalltalk: . test tool

tverwaes at codespeak.net tverwaes at codespeak.net
Thu Oct 25 18:35:29 CEST 2007


Author: tverwaes
Date: Thu Oct 25 18:35:29 2007
New Revision: 47961

Modified:
   pypy/dist/pypy/lang/smalltalk/squeakimage.py
   pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py
   pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py
Log:
(toon, arigo, cfbolz) invalidate shadows after image loading 


Modified: pypy/dist/pypy/lang/smalltalk/squeakimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/squeakimage.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/squeakimage.py	Thu Oct 25 18:35:29 2007
@@ -319,6 +319,8 @@
         w_pointersobject._vars = [g_object.w_object for g_object in self.pointers]
         w_pointersobject.w_class = self.g_class.w_object
         w_pointersobject.hash = self.chunk.hash12
+        if w_pointersobject._shadow is not None:
+            w_pointersobject._shadow.invalidate()
         
     def fillin_wordsobject(self, w_wordsobject):
         w_wordsobject.words = self.chunk.data

Modified: pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/test/test_miniimage.py	Thu Oct 25 18:35:29 2007
@@ -220,7 +220,7 @@
             return e.object
 
 def test_lookup_neg_abs_in_integer():
-    py.test.skip("TOFIX methodlookup 'negated' fails in shadow SmallInteger")
+    #py.test.skip("TOFIX methodlookup 'negated' fails in shadow SmallInteger")
     # Fails due to same reason because of which
     # classmirror-methodlookup fails
     test_lookup_abs_in_integer(-3)

Modified: pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/tool/analyseimage.py	Thu Oct 25 18:35:29 2007
@@ -51,7 +51,14 @@
     image = create_squeakimage()
     w_doesnot = image.special(constants.SO_DOES_NOT_UNDERSTAND)
     assert repr(w_doesnot.shadow_of_my_class()) == "<ClassShadow Symbol>"
+    print w_doesnot.getclass().fetch(constants.CLASS_METHODDICT_INDEX).shadow_of_my_class().instance_kind
+    print w_doesnot.getclass().fetch(constants.CLASS_METHODDICT_INDEX).shadow_of_my_class().instance_size
+    print
     print w_doesnot.getclass().fetch(constants.CLASS_METHODDICT_INDEX)._vars
+    print
+    print w_doesnot.getclass().fetch(constants.CLASS_METHODDICT_INDEX)._vars[constants.METHODDICT_NAMES_INDEX:]
+    print
+    print w_doesnot.getclass().fetch(constants.CLASS_METHODDICT_INDEX)._vars[constants.METHODDICT_VALUES_INDEX]._vars
 
 def test_do():
     testSelector()



More information about the Pypy-commit mailing list