checkin from browser
authorClaus Gittinger <cg@exept.de>
Mon, 20 Sep 1999 21:03:08 +0200
changeset 4781 631eb425ea4e
parent 4780 35deaaafd9b1
child 4782 04a2ea1ad3a5
checkin from browser
Smalltalk.st
--- a/Smalltalk.st	Mon Sep 20 19:50:29 1999 +0200
+++ b/Smalltalk.st	Mon Sep 20 21:03:08 1999 +0200
@@ -787,12 +787,13 @@
      we have to flush the caches since these methods are now void.
      Also, class variables of aClass are removed."
 
-    |sym cSym names oldName actualName wrongName|
+    |sym cSym names oldName oldNameSym actualName wrongName ns ons|
 
     aClass isNil ifTrue:[^ self].
+
     oldName := aClass name.
-    sym := oldName asSymbol.
-    ((self at:sym) == aClass) ifFalse:[
+    sym := oldNameSym := oldName asSymbol.
+    ((self at:oldNameSym) == aClass) ifFalse:[
         "check other name ..."
         (self includes:aClass) ifFalse:[
             'Smalltalk [warning]: no such class: ' errorPrint. oldName errorPrintCR.
@@ -815,6 +816,11 @@
         wrongName := true.
     ].
 
+    ns := aClass nameSpace.
+    aClass topOwningClass notNil ifTrue:[
+        ons := aClass topOwningClass nameSpace
+    ].
+
     self at:sym put:nil.    "nil it out for compiled accesses"
 
     "/
@@ -878,11 +884,19 @@
         ].
     ].
 
-    aClass nameSpace ~~ Smalltalk ifTrue:[
-        Metaclass class
-            recompileGlobalAccessorsTo:(aClass name)
-            in:(aClass topOwningClass nameSpace)
-            except:nil
+    ns ~~ Smalltalk ifTrue:[
+        ons notNil ifTrue:[
+            Metaclass class
+                recompileGlobalAccessorsTo:oldNameSym
+                in:ons
+                except:nil
+        ].
+        (ns notNil and:[ns ~~ ons]) ifTrue:[
+            Metaclass class
+                recompileGlobalAccessorsTo:oldNameSym
+                in:ns
+                except:nil
+        ].
     ].
 
     "Modified: / 20.6.1998 / 13:26:10 / cg"
@@ -4825,5 +4839,5 @@
 !Smalltalk class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.361 1999-09-20 06:59:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.362 1999-09-20 19:03:08 cg Exp $'
 ! !