recompile class methods accessing super ...
authorClaus Gittinger <cg@exept.de>
Tue, 10 Jun 1997 17:49:45 +0200
changeset 2684 011188940530
parent 2683 fee83a21a71e
child 2685 6576fb7af338
recompile class methods accessing super ... when the superclass changes
Metaclass.st
--- a/Metaclass.st	Sat Jun 07 14:28:10 1997 +0200
+++ b/Metaclass.st	Tue Jun 10 17:49:45 1997 +0200
@@ -1043,13 +1043,24 @@
         and:[oldClassVars = newClassVars]]]])
         ifTrue:[
 " "
-            Transcript showCR:'keep class methods (same classvars)'.
-            Transcript endEntry.
+"/            Transcript showCR:'keep class methods (same classvars)'.
+"/            Transcript endEntry.
 " "
 
             "/ class methods still work
 
-            self copyMethodsFrom:(oldClass class) for:newMetaclass
+            self copyMethodsFrom:(oldClass class) for:newMetaclass.
+
+" "
+            Transcript showCR:'recompiling class methods accessing super ...'.
+            Transcript endEntry.
+" "
+            "/ however, those accessing super must be recompiled
+
+            self copyInvalidatedMethodsFrom:(oldClass class) 
+                                        for:newMetaclass 
+                               accessingAny:#()
+                                    orSuper:true.
         ] ifFalse:[
             "/ superclass changed:
             "/  must recompile all class methods accessing ANY classvar
@@ -1063,16 +1074,16 @@
             newClass allClassVarNames do:[:nm | changeSet1 add:nm].
 
 " "
-            Transcript showCR:'recompiling class methods accessing any classvar'.
+            Transcript showCR:'recompiling class methods accessing any classvar or super ...'.
             Transcript endEntry.
 " "
             self copyInvalidatedMethodsFrom:(oldClass class) 
                                         for:newMetaclass 
                                accessingAny:changeSet1
                                     orSuper:true.
-            newMetaclass recompileInvalidatedMethods.
-        ]
-    ]ifFalse:[
+        ].
+        newMetaclass recompileInvalidatedMethods.
+    ] ifFalse:[
         "/ same superclass, find out which classvars have changed
 
         classVarChange := oldClassVars ~= newClassVars.
@@ -1270,7 +1281,7 @@
 
     "Created: 26.5.1996 / 11:55:26 / cg"
     "Modified: 18.6.1996 / 14:19:39 / stefan"
-    "Modified: 28.5.1997 / 16:25:47 / cg"
+    "Modified: 10.6.1997 / 17:48:28 / cg"
 !
 
 name:newName inEnvironment:aSystemDictionary
@@ -1819,5 +1830,5 @@
 !Metaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.112 1997-05-28 14:28:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.113 1997-06-10 15:49:45 cg Exp $'
 ! !