Class.st
changeset 2309 9d0fafbb5855
parent 2277 fc4b06d2cf78
child 2312 2eb583fcbd56
--- a/Class.st	Wed Jan 29 18:02:07 1997 +0100
+++ b/Class.st	Wed Jan 29 18:03:09 1997 +0100
@@ -2278,6 +2278,29 @@
 
     "Modified: 12.6.1996 / 11:52:35 / stefan"
     "Modified: 9.1.1997 / 02:07:40 / cg"
+!
+
+recompileMethodsAccessingGlobal:aGlobalKey
+    "{ Pragma: +optSpace }"
+
+    "recompile all methods accessing the global variable aGlobalKey"
+
+    self methodDictionary keys do:[:aSelector |
+        |m|
+
+        m := self compiledMethodAt:aSelector.
+        "/ can look at the methods literalArray ..
+        m isWrapped ifTrue:[
+            m := m originalMethod
+        ].
+        (m literals includes:aGlobalKey) ifTrue:[
+            self recompile:aSelector
+        ]
+    ]
+
+    "Modified: 12.6.1996 / 11:52:35 / stefan"
+    "Created: 29.1.1997 / 17:57:55 / cg"
+    "Modified: 29.1.1997 / 18:02:30 / cg"
 ! !
 
 !Class methodsFor:'enumerating'!
@@ -4835,6 +4858,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.251 1997-01-27 11:17:15 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.252 1997-01-29 17:03:09 cg Exp $'
 ! !
 Class initialize!