*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 09 Jan 1997 00:06:22 +0100
changeset 2093 3a849047dc90
parent 2092 054598f8f50e
child 2094 42cd02703bf4
*** empty log message ***
Make.proto
WeakDepDic.st
WeakDepDict.st
WeakDependencyDictionary.st
--- a/Make.proto	Thu Jan 09 00:03:53 1997 +0100
+++ b/Make.proto	Thu Jan 09 00:06:22 1997 +0100
@@ -1,4 +1,4 @@
-# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.85 1996-11-11 21:34:59 stefan Exp $
+# $Header: /cvs/stx/stx/libbasic/Make.proto,v 1.86 1997-01-08 23:06:17 cg Exp $
 #
 # -------------- no need to change anything below ----------
 
@@ -65,6 +65,7 @@
 	  Dict.$(O)          \
 	    IdDict.$(O)      \
 	      WeakIdDict.$(O)\
+	        WeakDepDict.$(O)\
 	    WeakVDict.$(O)   \
 	  IdSet.$(O)         \
 	    WeakIdSet.$(O)   \
@@ -314,6 +315,7 @@
 Unix.o: Unix.st $(STCHDR) ../include/Object.H
 WeakArr.o: WeakArr.st $(STCHDR) ../include/Array.H ../include/ArrColl.H ../include/SeqColl.H ../include/Coll.H ../include/Object.H
 WeakIdDict.o: WeakIdDict.st $(STCHDR) ../include/IdDict.H ../include/Dict.H ../include/Set.H ../include/Coll.H ../include/Object.H
+WeakDepDict.o: WeakDepDict.st $(STCHDR) ../include/WeakIdDict.H ../include/IdDict.H ../include/Dict.H ../include/Set.H ../include/Coll.H ../include/Object.H
 WeakVDict.o: WeakVDict.st $(STCHDR) ../include/Dict.H ../include/Set.H ../include/Coll.H ../include/Object.H
 WeakIdSet.o: WeakIdSet.st $(STCHDR) ../include/IdSet.H ../include/Set.H ../include/Coll.H ../include/Object.H
 WriteStr.o: WriteStr.st $(STCHDR) ../include/PosStream.H ../include/PeekStr.H ../include/Stream.H ../include/Object.H
--- a/WeakDepDic.st	Thu Jan 09 00:03:53 1997 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-"
- COPYRIGHT (c) 1997 by Claus Gittinger
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-
-
-WeakIdentityDictionary subclass:#WeakDependencyDictionary
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Collections-Unordered'
-!
-
-!WeakDependencyDictionary class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 1997 by Claus Gittinger
-              All Rights Reserved
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice.   This software may not
- be provided or otherwise made available to, or used by, any
- other person.  No title to or ownership of the software is
- hereby transferred.
-"
-
-!
-
-documentation
-"
-    A specialized WeakIdentityDictionary, which 'knowns' how
-    to get rid of obsolete entries. This is only used with the
-    dependency mechanism.
-
-    [author:]
-        Claus Gittinger
-
-    [See also:]
-        WeakArray WeakIdentityDictionary WeakValueDictionary WeakIdentitySet
-"
-! !
-
-!WeakDependencyDictionary methodsFor:'special dependency support'!
-
-removeEmptyDependencyValues
-    "special entry for dependency management:
-     remove any empty (due to finalization) value WeakArray elements."
-
-    |index t wasBlocked val|
-
-    "/ careful: this is sent by the finalizer at low prio.
-    "/ be prepared for the receiver to change while we walk over
-    "/ the value array here ...
-
-    index := 1.
-    [index <= keyArray size] whileTrue:[
-        "/ get the size again - it could have changed
-
-        wasBlocked := OperatingSystem blockInterrupts.
-        index <= keyArray size ifTrue:[
-            val := valueArray basicAt:index.
-            val notNil ifTrue:[
-                "/ is it an empty WeakArray ?
-
-                (val isMemberOf:WeakArray) ifTrue:[
-                    t := val findFirst:[:el | el notNil and:[el ~~ 0]].
-                    t == 0 ifTrue:[
-                        "/ yes - nil it
-                        valueArray basicAt:index put:nil.
-                        (keyArray basicAt:index) notNil ifTrue:[
-                            keyArray basicAt:index put:DeletedEntry.
-                            tally := tally - 1.
-                        ]
-                    ]
-                ] ifFalse:[
-                   "/ is it an empty WeakIdSet ?
-
-                   (val isMemberOf:WeakIdentitySet) ifTrue:[
-                        val size == 0 ifTrue:[
-                            "/ yes - nil it
-                            valueArray basicAt:index put:nil.
-                            (keyArray basicAt:index) notNil ifTrue:[
-                                keyArray basicAt:index put:DeletedEntry.
-                                tally := tally - 1.
-                            ]
-                        ].
-                    ]
-                ]
-            ]
-        ].
-
-        wasBlocked ifTrue:[OperatingSystem unblockInterrupts].
-        index := index + 1.
-    ].
-
-    "
-     Dependencies removeEmptyDependencyValues
-    "
-
-    "Modified: 8.1.1997 / 23:57:56 / cg"
-    "Created: 9.1.1997 / 00:00:28 / cg"
-! !
-
-!WeakDependencyDictionary class methodsFor:'documentation'!
-
-version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakDepDic.st,v 1.1 1997-01-08 23:03:53 cg Exp $'
-! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WeakDepDict.st	Thu Jan 09 00:06:22 1997 +0100
@@ -0,0 +1,117 @@
+"
+ COPYRIGHT (c) 1997 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+
+WeakIdentityDictionary subclass:#WeakDependencyDictionary
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Collections-Unordered'
+!
+
+!WeakDependencyDictionary class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1997 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+!
+
+documentation
+"
+    A specialized WeakIdentityDictionary, which 'knowns' how
+    to get rid of obsolete entries. This is only used with the
+    dependency mechanism.
+
+    [author:]
+        Claus Gittinger
+
+    [See also:]
+        WeakArray WeakIdentityDictionary WeakValueDictionary WeakIdentitySet
+"
+! !
+
+!WeakDependencyDictionary methodsFor:'special dependency support'!
+
+removeEmptyDependencyValues
+    "special entry for dependency management:
+     remove any empty (due to finalization) value WeakArray elements."
+
+    |index t wasBlocked val|
+
+    "/ careful: this is sent by the finalizer at low prio.
+    "/ be prepared for the receiver to change while we walk over
+    "/ the value array here ...
+
+    index := 1.
+    [index <= keyArray size] whileTrue:[
+        "/ get the size again - it could have changed
+
+        wasBlocked := OperatingSystem blockInterrupts.
+        index <= keyArray size ifTrue:[
+            val := valueArray basicAt:index.
+            val notNil ifTrue:[
+                "/ is it an empty WeakArray ?
+
+                (val isMemberOf:WeakArray) ifTrue:[
+                    t := val findFirst:[:el | el notNil and:[el ~~ 0]].
+                    t == 0 ifTrue:[
+                        "/ yes - nil it
+                        valueArray basicAt:index put:nil.
+                        (keyArray basicAt:index) notNil ifTrue:[
+                            keyArray basicAt:index put:DeletedEntry.
+                            tally := tally - 1.
+                        ]
+                    ]
+                ] ifFalse:[
+                   "/ is it an empty WeakIdSet ?
+
+                   (val isMemberOf:WeakIdentitySet) ifTrue:[
+                        val size == 0 ifTrue:[
+                            "/ yes - nil it
+                            valueArray basicAt:index put:nil.
+                            (keyArray basicAt:index) notNil ifTrue:[
+                                keyArray basicAt:index put:DeletedEntry.
+                                tally := tally - 1.
+                            ]
+                        ].
+                    ]
+                ]
+            ]
+        ].
+
+        wasBlocked ifTrue:[OperatingSystem unblockInterrupts].
+        index := index + 1.
+    ].
+
+    "
+     Dependencies removeEmptyDependencyValues
+    "
+
+    "Modified: 8.1.1997 / 23:57:56 / cg"
+    "Created: 9.1.1997 / 00:00:28 / cg"
+! !
+
+!WeakDependencyDictionary class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/WeakDepDict.st,v 1.1 1997-01-08 23:06:22 cg Exp $'
+! !
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WeakDependencyDictionary.st	Thu Jan 09 00:06:22 1997 +0100
@@ -0,0 +1,117 @@
+"
+ COPYRIGHT (c) 1997 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+
+WeakIdentityDictionary subclass:#WeakDependencyDictionary
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'Collections-Unordered'
+!
+
+!WeakDependencyDictionary class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1997 by Claus Gittinger
+              All Rights Reserved
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice.   This software may not
+ be provided or otherwise made available to, or used by, any
+ other person.  No title to or ownership of the software is
+ hereby transferred.
+"
+
+!
+
+documentation
+"
+    A specialized WeakIdentityDictionary, which 'knowns' how
+    to get rid of obsolete entries. This is only used with the
+    dependency mechanism.
+
+    [author:]
+        Claus Gittinger
+
+    [See also:]
+        WeakArray WeakIdentityDictionary WeakValueDictionary WeakIdentitySet
+"
+! !
+
+!WeakDependencyDictionary methodsFor:'special dependency support'!
+
+removeEmptyDependencyValues
+    "special entry for dependency management:
+     remove any empty (due to finalization) value WeakArray elements."
+
+    |index t wasBlocked val|
+
+    "/ careful: this is sent by the finalizer at low prio.
+    "/ be prepared for the receiver to change while we walk over
+    "/ the value array here ...
+
+    index := 1.
+    [index <= keyArray size] whileTrue:[
+        "/ get the size again - it could have changed
+
+        wasBlocked := OperatingSystem blockInterrupts.
+        index <= keyArray size ifTrue:[
+            val := valueArray basicAt:index.
+            val notNil ifTrue:[
+                "/ is it an empty WeakArray ?
+
+                (val isMemberOf:WeakArray) ifTrue:[
+                    t := val findFirst:[:el | el notNil and:[el ~~ 0]].
+                    t == 0 ifTrue:[
+                        "/ yes - nil it
+                        valueArray basicAt:index put:nil.
+                        (keyArray basicAt:index) notNil ifTrue:[
+                            keyArray basicAt:index put:DeletedEntry.
+                            tally := tally - 1.
+                        ]
+                    ]
+                ] ifFalse:[
+                   "/ is it an empty WeakIdSet ?
+
+                   (val isMemberOf:WeakIdentitySet) ifTrue:[
+                        val size == 0 ifTrue:[
+                            "/ yes - nil it
+                            valueArray basicAt:index put:nil.
+                            (keyArray basicAt:index) notNil ifTrue:[
+                                keyArray basicAt:index put:DeletedEntry.
+                                tally := tally - 1.
+                            ]
+                        ].
+                    ]
+                ]
+            ]
+        ].
+
+        wasBlocked ifTrue:[OperatingSystem unblockInterrupts].
+        index := index + 1.
+    ].
+
+    "
+     Dependencies removeEmptyDependencyValues
+    "
+
+    "Modified: 8.1.1997 / 23:57:56 / cg"
+    "Created: 9.1.1997 / 00:00:28 / cg"
+! !
+
+!WeakDependencyDictionary class methodsFor:'documentation'!
+
+version
+    ^ '$Header: /cvs/stx/stx/libbasic/WeakDependencyDictionary.st,v 1.1 1997-01-08 23:06:22 cg Exp $'
+! !