--- a/IdentityDictionary.st Sun Jan 09 22:16:16 1994 +0100
+++ b/IdentityDictionary.st Sun Jan 09 22:17:33 1994 +0100
@@ -26,7 +26,7 @@
Since compare is on identity keys, hashing is also done via
identityHash instead of hash.
-$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.5 1993-12-11 00:49:19 claus Exp $
+$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.6 1994-01-09 21:17:23 claus Exp $
written jul 92 by claus
'!
@@ -39,7 +39,7 @@
This is a slow access, since there is no fast reverse mapping"
keyArray keysAndValuesDo:[:index :aKey |
- aKey notNil ifTrue:[
+ (aKey notNil and:[aKey ~~ DeletedEntry]) ifTrue:[
(valueArray at:index) == aValue ifTrue:[^ aKey].
]
].
@@ -63,6 +63,10 @@
index := startIndex.
[true] whileTrue:[
probe := keyArray basicAt:index.
+ probe == DeletedEntry ifTrue:[
+ keyArray basicAt:index put:nil.
+ ^ index
+ ].
(probe isNil or: [probe == key]) ifTrue:[^ index].
index == length ifTrue:[