--- a/WeakIdentityDictionary.st Fri Aug 05 03:03:07 1994 +0200
+++ b/WeakIdentityDictionary.st Fri Aug 05 03:03:10 1994 +0200
@@ -20,6 +20,8 @@
WeakIdentityDictionary comment:'
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
+
+$Header: /cvs/stx/stx/libbasic/WeakIdentityDictionary.st,v 1.5 1994-08-05 01:03:06 claus Exp $
'!
!WeakIdentityDictionary class methodsFor:'documentation'!
@@ -40,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/WeakIdentityDictionary.st,v 1.4 1994-06-02 16:22:47 claus Exp $
+$Header: /cvs/stx/stx/libbasic/WeakIdentityDictionary.st,v 1.5 1994-08-05 01:03:06 claus Exp $
"
!
@@ -81,6 +83,25 @@
1 to:sz do:[:index |
(keyArray at:index) isNil ifTrue:[
(valueArray at:index) notNil ifTrue:[
+ "
+ if the next slot is not nil, it could be there due
+ to a hash collision. In this case we have to put a
+ DeletedMark into the slot.
+ "
+"/ soon to come; can then avoid rehash
+"/
+"/ index == sz ifTrue:[
+"/ next := 1
+"/ ] ifFalse:[
+"/ next := index + 1.
+"/ ].
+"/
+"/ (keyArray basicAt:next) notNil ifTrue:[
+"/ (valueArray basicAt:next) notNil ifTrue:[
+"/ keyArray basicAt:index put:DeletedEntry
+"/ ]
+"/ ].
+
valueArray at:index put:nil.
tally := tally - 1.
any := true