Metaclass.st
changeset 4749 940aee58bda6
parent 4725 98e0fa189aba
child 4774 963f2e5d1f24
--- a/Metaclass.st	Fri Sep 17 14:35:43 1999 +0200
+++ b/Metaclass.st	Fri Sep 17 15:27:40 1999 +0200
@@ -1381,6 +1381,13 @@
         ].
     ].
 
+    "/ finally, if the oldClass came from a dynamically loaded
+    "/ classLibrary, we must recompile the methods in the newClass.
+    "/ otherwise, the methods code will vanish when the old (obsolete)
+    "/ class eventually vanishes ...
+    self recompileMachineCodeMethodsIn:newClass.
+
+
     "/ WOW, everything done for this class
     "/ what about subclasses ?
 
@@ -1895,6 +1902,13 @@
     "Modified: 31.1.1997 / 11:22:57 / cg"
 !
 
+recompileMachineCodeMethodsIn:aClass
+    "recompile all machine-code methods in aClass."
+
+    aClass recompileMethodsWithMachineCode.
+    aClass class recompileMethodsWithMachineCode.
+!
+
 setSoleInstance:aClass 
     myClass := aClass
 
@@ -2030,6 +2044,6 @@
 !Metaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.153 1999-09-14 11:50:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.154 1999-09-17 13:27:40 cg Exp $'
 ! !
 Metaclass initialize!