equal
deleted
inserted
replaced
132 ]. |
132 ]. |
133 index := index \\ length + 1. |
133 index := index \\ length + 1. |
134 startIndex := index. |
134 startIndex := index. |
135 |
135 |
136 [true] whileTrue:[ |
136 [true] whileTrue:[ |
137 probe := keyArray basicAt:index. |
137 probe := keyArray basicAt:index. |
138 key == probe ifTrue:[^ index]. |
138 key == probe ifTrue:[^ index]. |
139 probe isNil ifTrue:[ |
139 (self slotIsEmpty:probe) ifTrue:[ |
140 delIndex == 0 ifTrue:[^ index]. |
140 delIndex == 0 ifTrue:[^ index]. |
141 keyArray basicAt:delIndex put:nil. |
141 keyArray basicAt:delIndex put:nil. |
142 ^ delIndex |
142 ^ delIndex |
143 ]. |
143 ]. |
144 |
144 |
145 probe == DeletedEntry ifTrue:[ |
145 probe == DeletedEntry ifTrue:[ |
146 delIndex == 0 ifTrue:[ |
146 delIndex == 0 ifTrue:[ |
147 delIndex := index |
147 delIndex := index |
148 ] |
148 ] |
149 ]. |
149 ]. |
150 |
150 |
151 index == length ifTrue:[ |
151 index == length ifTrue:[ |
152 index := 1 |
152 index := 1 |
153 ] ifFalse:[ |
153 ] ifFalse:[ |
154 index := index + 1 |
154 index := index + 1 |
155 ]. |
155 ]. |
156 index == startIndex ifTrue:[ |
156 index == startIndex ifTrue:[ |
157 delIndex ~~ 0 ifTrue:[ |
157 delIndex ~~ 0 ifTrue:[ |
158 keyArray basicAt:delIndex put:nil. |
158 keyArray basicAt:delIndex put:nil. |
159 ^ delIndex |
159 ^ delIndex |
160 ]. |
160 ]. |
161 ^ self grow findKeyOrNil:key |
161 ^ self grow findKeyOrNil:key |
162 ]. |
162 ]. |
163 ] |
163 ] |
164 |
164 |
165 "Modified: 26.3.1996 / 20:00:44 / cg" |
165 "Modified: 26.3.1996 / 20:00:44 / cg" |
166 ! |
166 ! |
167 |
167 |
199 ! ! |
199 ! ! |
200 |
200 |
201 !IdentityDictionary class methodsFor:'documentation'! |
201 !IdentityDictionary class methodsFor:'documentation'! |
202 |
202 |
203 version |
203 version |
204 ^ '$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.28 2001-11-23 10:11:36 martin Exp $' |
204 ^ '$Header: /cvs/stx/stx/libbasic/IdentityDictionary.st,v 1.29 2001-12-21 10:59:16 cg Exp $' |
205 ! ! |
205 ! ! |