1 2005-12-20 Sebastien Pouliot <sebastien@ximian.com>
3 * List.cs: Applied Atsushi's patch for Sort (bug 76361) now that the
4 generic versions of Array.Sort are implemented.
6 2005-12-19 Sebastien Pouliot <sebastien@ximian.com>
8 * Dictionary.cs: Added [Serializable] attribute to both inner
9 Enumerator struct in Key and Value inner collection classes.
10 * EqualityComparer.cs: Added missing IEqualityComparer interface.
11 * List.cs: Added [Serializable] attribute to both inner Enumerator
14 2005-12-19 Sebastien Pouliot <sebastien@ximian.com>
16 * Dictionary.cs: Fixed ICollection.CopyTo to use DictionaryEntry. Fixed
17 Key and Value CopyTo not to throw exception if the dictionary is empty
19 * List.cs: Fix exception reporting to match MS behaviour (2.0 final).
21 2005-11-19 Zoltan Varga <vargaz@gmail.com>
23 * KeyNotFoundException.cs: Add default message.
25 2005-09-18 Miguel de Icaza <miguel@novell.com>
27 * Dictionary.cs: Change style for internal fields.
29 If the capacity is zero, set the capacity to our default size as 0
30 is an allowed parameter in .NET
32 2005-08-10 Kamil Skalski <nazgul@nemerle.org>
34 * KeyValuePair.cs, Dictionary.cs: Change Key and Value to properties to match
35 .NET 2.0 July CTP. Update its use in Dictionary, since now we
38 2005-07-10 Kamil Skalski <nazgul@nemerle.org>
40 * Comparer.cs, EqualityComparer.cs: Use MakeGenericType instead of BindGenericParameters.
43 2005-06-27 Raja R Harinath <rharinath@novell.com>
45 Introduce some thread-safety by removing the modify-on-read
46 move-to-front heuristic.
47 * Dictionary.cs (_enumeratorGeneration, _enumerators): Remove.
48 (Count): Add internal property set. Invalidate enumerators when
49 Count is changed. Change all references of _usedSlots to Count.
50 (this): Invalidate enumerators when the value of some slot is
51 changed, even if the layout of the data-structure isn't modified.
52 (DoHash): Remove null-key check. All codepaths leading to this
53 function already have the check.
54 (GetSlot): Remove move-to-front heuristic.
57 2005-06-24 Martin Baulig <martin@ximian.com>
59 * IDictionary.cs: Use the same type parameter names than on MS.
61 * IDictionary.cs, Dictionary.cs: We don't need the `CLSCompliant'
64 2005-06-23 Martin Baulig <martin@ximian.com>
66 * *.cs: Removed the `[ComVisible(false)]' attributes everywhere.
68 2005-06-22 Raja R Harinath <rharinath@novell.com>
70 * Dictionary.cs (_generation, _enumeratorGeneration, _enumerators):
71 New fields to implement fail-fast semantics. All code that
72 modifies the table increment _generation.
73 (GetSlot): Use _hcp to compare keys. Return the slot containing
74 the key, rather than the index. Avoid move-to-front heuristic
75 when there's an enumerator coursing through the table.
76 (this, Add, TryGetValue, ContainsKey, Remove): Update to change.
77 (Enumerator.Enumerator): Save the generation of the dictionary.
78 (Enumerator.Dispose): Inform dictionary that the enumerator is no more.
79 (Enumerator.MoveNext, Enumerator.VerifyState): Fail if the
80 dictionary has been modified.
82 2005-06-20 David waite <mass@akuma.org>
84 * List.cs : substantial changes and optimizations
85 (AddCollection, AddEnumerable): new internal specializations of AddRange
86 (AsReadOnly): returns specific IList<T> to match ms.net 2.0b2 api.
87 (Clear): reset size to zero on clear
88 (ConvertAll): catch null converter, use Add to prevent OutOfBounds
90 (FindAll, FindIndex, FindLast, FindLastIndex, RemoveAll, TrueForAll):
92 (FindLastIndex): correct index parameters based on ms.net 2005b2 behavior
93 (ForEach): catch null action
94 (CheckIndex): new internal function similar to CheckRange for functions
95 which only provide a starting index
96 (InsertCollection, InsertEnumerable): new internal specializations of
98 (ReadOnlyList): removed, ReadOnlyCollection in
99 System.Collections.ObjectModel is used instead now
101 2005-06-16 David Waite <mass@akuma.org>
103 * Dictionary.cs (EnumerationMode): Remove.
104 (Enumerator): Remove return type flag - legacy return is expected to
105 always return a DictionaryEntry
106 (Enumerator): Make constructor internal, it is not public on ms.net
108 (VerifyState): Added method to check state preconditions and throw
109 appropriate exceptions.
110 (KeyCollection,ValueCollection): Mark sealed to match ms.net beta 2
111 (KeyCollection.Enumerator._hostEnumerator): make exact struct type,
112 rather than boxing and using by interface
113 (KeyCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
114 (ValueCollection.Enumerator._hostEnumerator): make exact struct type,
115 rather than boxing and using by interface
116 (ValueCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
117 * EqualityComparer.cs (DefaultComparer, IEquatableOfTEqualityComparer):
118 Mark as serializable.
120 2005-06-16 Raja R Harinath <rharinath@novell.com>
122 * Dictionary.cs (GetKeys, GetValues): Remove.
123 (SetThreshold): New function to calculate the resize threshold.
124 (CopyTo): Don't use foreach syntax.
125 (ContainsValue): Likewise. Use default equality comparer of the
127 (GetObjectData): Use CopyTo to copy into temporary array. Don't
128 save redundant _usedSlots and _threshold.
129 (OnDeserialization): Rewrite.
130 (ICollection<>.CopyTo): Forward to CopyTo.
131 (Enumerator._nextIndex): Rename to from _index.
132 (Enumerator._next, Enumerator.FixNext): Remove.
133 (Enumerator.Current): Rewrite to avoid need for _next.
134 (Enumerator.IEnumerator.Reset): Update.
135 (KeyCollection): Is also IEnumerable<TKey> and IEnumerable.
136 Update methods to conform to standard.
137 (KeyCollection.GetEnumerator): Restore. Return the correct type.
138 (KeyCollection.Enumerator): Rename from KeyEnumerator. Simple
139 wrapper that forwards to Dictionary<,>.Enumerator.
140 (ValueCollection): Likewise.
142 2005-06-12 David Waite <dwaite@gmail.com>
144 * IKeyComparer.cs: removed
145 * KeyValuePair.cs: add same-style ToString as ms.net Beta2 impl,
146 make Serializable, use correct field names.
147 * Dictionary.cs: Miscelaneus clean-ups, added serialization
148 support, use Hashtable prime functions
150 2005-06-12 Ben Maurer <bmaurer@ximian.com>
152 * Comparer.cs, EqualityComparer.cs: Important performance hack:
153 make sure that we don't box stuff and do reflection on every
154 comparison. We use reflection at cctor time rather than on every
157 2005-06-09 Raja R Harinath <rharinath@novell.com>
159 Simplify Enumerator.MoveNext to make it "obviously correct", rather
160 than require subtle reasoning about the state of various variables.
161 * Dictionary.cs (Enumerator._isValid): Remove. Replace all uses
162 with "_current == null".
163 (Enumerator._validNodeVisited): Remove.
164 (Enumerator._next): New. Holds the the next position.
165 (Enumerator.FixNest): New helper function that ensures that _next
167 (Enumerator.MoveNext): Simplify. Now, copies _next to _current
168 and advances _next if possible.
170 2005-06-08 Martin Baulig <martin@ximian.com>
172 * Dictionary.cs (Dictionary.KeyEnumerator): Removed the public
173 GetEnumerator() function since it's returning the wrong type.
174 (Dictionary.ValueEnumerator): Likewise. Fix #75073.
176 2005-06-08 Ankit Jain <ankit@corewars.org>
178 * Dictionary.cs (Dictionary<TKey, TValue>.MoveNext): Allow traversal of chain in last slot
179 of the table. Fixes #75168.
181 2005-06-04 Ben Maurer <bmaurer@ximian.com>
183 * *.cs: 2.0 api fixups
185 2005-05-26 Miguel de Icaza <miguel@novell.com>
187 * Dictionary.cs: Remove the `Hash' name from the Dictionary
188 internal classes, make them public.
190 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
192 * Dictionary.cs: Fix a warning.
194 * IDictionary.cs: Add missing TryGetValue method.
196 2005-05-19 Geoff Norton <gnorton@customerdna.com>
198 * List.cs (Insert): Resize the array before the shift if needed
200 2005-05-18 Miguel de Icaza <miguel@novell.com>
202 * List.cs (GetRange): Implement.
204 Do not do lazy loading of data. Not worth adding an
205 extra check, and not worth the bugs.
207 This decision wont be discussed until: a) a full List regression
208 test suite exists and b) performance benchmarks are created. (b)
209 depends on (a) or the argument wont even be heard.
211 2005-05-13 Atsushi Enomoto <atsushi@ximian.com>
213 * Queue.cs, Stack.cs: moved to System.dll
215 2005-05-06 Martin Baulig <martin@ximian.com>
217 * *.cs: Add CLSCompliant(true) where missing.
219 2005-05-06 Zoltan Varga <vargaz@freemail.hu>
221 * *.cs: Remove CLSCompliant(false) attributes.
223 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
225 * List.cs: Applied patch from Mart Roosmaa (roosmaa@gmail.com).
226 Fix Insert method. Fixes #74824.
228 2005-04-29 Martin Baulig <martin@ximian.com>
230 Reflect latest spec changes.
232 * IEnumerable.cs (IEnumerable<T>): Implement IEnumerable.
233 * IEnumerator.cs (IEnumerator<T>): Implement IEnumerator.
235 2005-04-29 Raja R Harinath <rharinath@novell.com>
238 * Dictionary.cs (Slot<K,V>): Move to ...
239 (Dictionary<K,V>.Slot): ... here.
241 2005-04-28 Martin Baulig <martin@ximian.com>
243 * Dictionary.cs, Queue.cs, Stack.cs, List.cs, Comparer.cs: Don't
244 duplicate type parameters in the nested classes.
246 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
248 * List.cs: Fix ToArray () method. Fixes #74675.
250 2005-04-04 Raja R Harinath <rharinath@novell.com>
252 * Dictionary.cs: Update to draft of Feb 27. Add some argument checks.
253 (GetSlot): Don't throw KeyNotFoundException. Unify all list
254 traversals in here. Move found key to head of chain, and return
255 the index of the chain suitable for/containing the key.
256 (Item, Add, Remove): Simplify, and remove FIXMEs.
257 (Resize): Reuse linked list nodes from old table.
258 (Dictionary.CopyTo, HashKeyCollection.CopyTo, HashValueCollection.CopyTo):
259 Add some argument checks.
261 2005-04-02 Ben Maurer <bmaurer@ximian.com>
263 * Dictionary.cs: Real impl.
265 2005-02-21 Martin Baulig <martin@ximian.com>
267 * IComparer.cs: Reverted the last change here, Equals() and
268 GetHashCode() have been removed a long time ago.
270 2005-02-21 Kazuki Oikawa <kazuki@panicode.com>
272 * IComparer.cs, IDictionary.cs: Corrected the wrong declaration.
274 2005-02-11 Carlos Alberto Cortez <calberto.cortez@gmail.com>
276 * List.cs: Added internal ReadOnlyCollection class,
277 which is a wrapper for a read only IList<T> version of the List<T>.
278 Used in AsReadOnly () method.
280 2005-02-07 Ben Maurer <bmaurer@ximian.com>
282 * List.cs (CheckRange): Comparison error. Duh!
283 (Shift): really deal with neg. delta. Also, adjust the `size'.
285 Based on a patch from Marc Denty (marc.denty@libertysurf.fr).
289 2005-01-29 Ben Maurer <bmaurer@ximian.com>
291 * Queue.cs: `duh' bugs.
293 2004-12-27 Ben Maurer <bmaurer@ximian.com>
295 * Stack.cs: Stupid bug fixes.
297 * List.cs: My new (mostly untested ;-) impl of List
298 <T>. Implements most of the API.
300 2004-12-26 Ben Maurer <bmaurer@ximian.com>
302 * Queue.cs: New, non-linked-list based impl.
304 2004-11-29 Ben Maurer <bmaurer@ximian.com>
306 * Comparer.cs: Update this class.
308 2004-11-25 Carlos Alberto Cortez <calberto.cortez@gmail.com>
310 * List.cs: Enumerator changed to behave like the MS impl.
312 2004-11-25 Ben Maurer <bmaurer@ximian.com>
314 * Stack.cs: New, list based impl. Waiting for some gmcs fixes.
316 2004-11-10 Martin Baulig <martin@ximian.com>
318 * IDictionary.cs (IDictionary): `IsReadOnly' and `Clear' are
319 inherited from ICollection.
321 2004-09-20 Gert Driesen <drieseng@users.sourceforge.net>
323 * ReadOnlyCollection.cs: Moved to System assembly
324 * Collection.cs: Moved to System assembly
326 2004-09-07 Carlos Alberto Cortez <carlos@unixmexico.org>
328 * ReadOnlyCollection.cs: New file and changes to
329 Collection.cs tu support it.
331 2004-09-05 Marek Safar <marek.safar@seznam.cz>
333 * Dictionary.cs: Added new file (no implementation).
335 2004-09-03 Carlos Alberto Cortez <carlos@unixmexico.org>
337 * Collection.cs: Small improvements related to
338 style, resizing, and type checking.
340 2004-09-01 Carlos Alberto Cortez <carlos@unixmexico.org>
342 * Collection.cs: New file.
344 2004-08-04 Martin Baulig <martin@ximian.com>
346 * List.cs (List<T>.Enumerator): Made this a struct.
347 (List<T>.GetEnumerator): The public method now returns the
350 2004-08-02 Martin Baulig <martin@ximian.com>
352 Started to do some API review.
354 * ICollection.cs (ICollection<T>): Added IsReadOnly, Add, Clear,
357 * IList.cs (IList<T>): Removed Add, Clear, Constains, Remove,
358 IsReadOnly and IsFixedSize.
360 2004-08-02 Martin Baulig <martin@ximian.com>
362 * IList.cs (IList.Add): Changed return type to void.
364 * List.cs (List.Add): Likewise.
366 2004-07-16 Martin Baulig <martin@ximian.com>
368 * IComparable.cs: Removed, it's in System.
370 2004-07-12 Duncan Mak <duncan@ximian.com>
372 * KeyNotFoundException.cs: Added.
374 2004-06-18 Ben Maurer <bmaurer@ximian.com>
376 * Comparer.cs: v2 impl. Some workarounds for gmcs are enabled.
378 2004-05-26 Sebastien Pouliot <sebastien@ximian.com>
380 * Queue.cs: Fixed possible integer overflow in CopyTo methods.
381 * Stack.cs: Fixed possible integer overflow in CopyTo methods.
383 2004-03-13 Martin Baulig <martin@ximian.com>
385 * Stack.cs, Queue.cs, List.cs: Implement the non-generic interfaces.
387 2004-03-11 Martin Baulig <martin@ximian.com>
391 2004-03-11 Martin Baulig <martin@ximian.com>
393 * Stack.cs, Queue.cs: Just use `Node' for the nested class, not
394 `Node<T>' (which would create another type parameter `T'
395 overriding `T' from the outer class).
397 2004-02-23 Martin Baulig <martin@ximian.com>
399 * Stack.cs, Queue.cs: New files. Hmm, looks like I forgot to add
400 them to CVS; they're already on my hard disk since December or so.
402 2003-12-08 Martin Baulig <martin@ximian.com>
404 * *.cs: require GENERICS.
406 2003-11-08 Ben Maurer <bmaurer@users.sourceforge.net>
408 * *.cs: require NET_2_0 and GENERICS
410 2003-11-07 Ben Maurer <bmaurer@users.sourceforge.net>
412 * IComparable.cs, IComparer.cs, IDictionary.cs, IKeyComparer.cs, KeyValuePair.cs
415 2003-11-06 Martin Baulig <martin@ximian.com>
417 * ICollection.cs, IList.cs, IEnumerator.cs, IEnumerable.cs:
418 Started to implement the System.Collections.Generic classes.