equal
deleted
inserted
replaced
65 "/ ^ keyArray identityIndexOf:key ifAbsent:aBlock. |
65 "/ ^ keyArray identityIndexOf:key ifAbsent:aBlock. |
66 "/ ]. |
66 "/ ]. |
67 "/ |
67 "/ |
68 |
68 |
69 index := key identityHash. |
69 index := key identityHash. |
70 index := index * 2 \\ length + 1. |
70 index < 16r1FFFFFFF ifTrue:[ |
|
71 index := index * 2 |
|
72 ]. |
|
73 index := index \\ length + 1. |
71 startIndex := index. |
74 startIndex := index. |
72 |
75 |
73 [true] whileTrue:[ |
76 [true] whileTrue:[ |
74 probe := (keyArray basicAt:index). |
77 probe := (keyArray basicAt:index). |
75 probe == key ifTrue:[^ index]. |
78 probe == key ifTrue:[^ index]. |
98 |
101 |
99 delIndex := 0. |
102 delIndex := 0. |
100 |
103 |
101 length := keyArray basicSize. |
104 length := keyArray basicSize. |
102 index := key identityHash. |
105 index := key identityHash. |
103 index := index * 2 \\ length + 1. |
106 index < 16r1FFFFFFF ifTrue:[ |
|
107 index := index * 2 |
|
108 ]. |
|
109 |
|
110 index := index \\ length + 1. |
104 startIndex := index. |
111 startIndex := index. |
105 |
112 |
106 [true] whileTrue:[ |
113 [true] whileTrue:[ |
107 probe := keyArray basicAt:index. |
114 probe := keyArray basicAt:index. |
108 key == probe ifTrue:[^ index]. |
115 key == probe ifTrue:[^ index]. |
142 |index "{ Class:SmallInteger }" |
149 |index "{ Class:SmallInteger }" |
143 length| |
150 length| |
144 |
151 |
145 length := keyArray basicSize. |
152 length := keyArray basicSize. |
146 index := key identityHash. |
153 index := key identityHash. |
147 index := index * 2 \\ length + 1. |
154 index < 16r1FFFFFFF ifTrue:[ |
|
155 index := index * 2 |
|
156 ]. |
|
157 index := index \\ length + 1. |
148 |
158 |
149 [(keyArray basicAt:index) notNil] whileTrue:[ |
159 [(keyArray basicAt:index) notNil] whileTrue:[ |
150 index == length ifTrue:[ |
160 index == length ifTrue:[ |
151 index := 1 |
161 index := 1 |
152 ] ifFalse:[ |
162 ] ifFalse:[ |
160 ! ! |
170 ! ! |
161 |
171 |
162 !IdentitySet class methodsFor:'documentation'! |
172 !IdentitySet class methodsFor:'documentation'! |
163 |
173 |
164 version |
174 version |
165 ^ '$Header: /cvs/stx/stx/libbasic/IdentitySet.st,v 1.19 1996-11-12 14:04:53 cg Exp $' |
175 ^ '$Header: /cvs/stx/stx/libbasic/IdentitySet.st,v 1.20 1996-11-12 15:13:55 cg Exp $' |
166 ! ! |
176 ! ! |