86072a392aeaf65eb1a92a20c247aedbc1e30fac
[mono.git] / mcs / class / corlib / System.Collections.Generic / ChangeLog
1 2010-06-29  Marek Safar <marek.safar@gmail.com>
2
3         * List.cs: Optimize IEnumerable<T> ctor.
4
5 2010-05-15  Marek Safar <marek.safar@gmail.com>
6
7         * KeyValuePair.cs: Initialize fields definitely.
8
9 2010-03-19  Sebastien Pouliot  <sebastien@ximian.com>
10
11         * CollectionDebuggerView.cs: Change to internal so we can avoid
12         a duplicating the type in assemblies that have [InternalsVisibleTo]
13
14 2010-01-25 Gonzalo Paniagua Javier <gonzalo@novell.com>
15
16         * EqualityComparer.cs: (Equals) the arguments are checked to be
17         the correct type.
18
19 2010-01-24  Robert Jordan  <robertj@gmx.net>
20
21         * Dictionary.cs: Fix deserialization compatibility with MS.NET.
22         Fixes bug #474009.
23
24 2010-01-20  Miguel de Icaza  <miguel@novell.com>
25
26         * Dictionary.cs: Always create the keys, fixes compatibility
27         between Mono and .NET.  Patch from John Lenz <jlenz2@math.uiuc.edu>
28
29 2009-12-06  Chris Toshok  <toshok@ximian.com>
30
31         * KeyValuePair.cs: we need setters for Key and Value so they can
32         be set via reflection from
33         System.ServiceModel.System.Runtime.Serialization.Json.TypeMap.cs.
34
35 2009-11-26  Marek Safar <marek.safar@gmail.com>
36         
37         * CollectionDebuggerView.cs: Removed limit restriction.
38
39 2009-11-23   Carlos Alberto Cortez <calberto.cortez@gmail.com>
40
41         * Comparer.cs: Our DefaultComparer class should be serializable just
42         as the generic one is.
43         Fixes #503585.
44
45 2009-11-23  Juraj Skripsky <js@hotfeet.ch>
46
47         * List.cs (Sort): Call more appropriate overload of Array.Sort<T>.
48         Array.Sort<T> should be able to determine the comparison itself.
49         Speeds up the sorting for items of primitive type. 
50         Fixes #530450.
51
52 2009-11-08  Juraj Skripsky <js@hotfeet.ch>
53
54         * List.cs (Sort): Sync to latest changes in Array.Sort.
55
56 2009-10-20  Marek Safar <marek.safar@gmail.com>
57         
58         * List.cs, CollectionDebuggerView.cs, KeyValuePair.cs, Dictionary.cs
59         Improve debugging experience.
60
61 2009-10-19  Marek Safar <marek.safar@gmail.com>
62         
63         * CollectionDebuggerView.cs: New file.
64
65 2009-10-17  Sebastien Pouliot  <sebastien@ximian.com>
66
67         * EqualityComparer.cs: Seal internal classes
68
69 2009-10-02  Raja R Harinath  <harinath@hurrynot.org>
70
71         * Dictionary.cs (Do_ICollectionCopyTo): Revert 2009-10-01 change.
72         Use BOOTSTRAP_BASIC to hide code from gmcs 2.4.x.
73
74 2009-10-01  Marek Habersack  <mhabersack@novell.com>
75
76         * Dictionary.cs: cast target array to TRet[] instead of object[] -
77         may fail, but otherwise it doesn't compile with 2.4 (e.g. when
78         bootstrapping trunk)
79
80 2009-09-22  Raja R Harinath  <harinath@hurrynot.org>
81
82         Ensure that invalid arrays to CopyTo result in ArgumentExceptions.
83         * Dictionary.cs (CopyToCheck, Do_CopyTo): Carve out of ...
84         (CopyTo): ... this.
85         (Do_ICollectionCopyTo): Carve out of ICollection.CopyTo.  Convert
86         type-cast exceptions to ArgumentExceptions.
87         (KeyCollection.CopyTo): Use them.
88         (ValueCollection.CopyTo): Use them.
89
90 2009-07-31  Raja R Harinath  <harinath@hurrynot.org>
91
92         * List.cs (IList.this.set): Convert NullReference and InvalidCast
93         exceptions into ArgumentExceptions.
94         (IList.Add, IList.Contains, IList.IndexOf, IList.Insert, IList.Remove):
95         Convert NullReferenceException to ArgumentException.
96
97 2009-07-31  Raja R Harinath  <harinath@hurrynot.org>
98
99         * List.cs (Enumerator.next): Rename from Enumerator.idx and change
100         meaning to be the index of the next item to be enumerated.
101         (Enumerator.MoveNext): Simplify.
102
103 2009-07-31  Raja R Harinath  <harinath@hurrynot.org>
104
105         * Dictionary.cs (Enumerator.next): Rename from Enumerator.cur and
106         change meaning to be the index of the slot to start searching on
107         the next iteration.
108         (Enumerator.MoveNext): Avoid an out-of-bounds access.
109
110 2009-07-30  Raja R Harinath  <harinath@hurrynot.org>
111
112         * List.cs (Enumerator.current): New.
113         (Enumerator.MoveNext): Update it.
114         (Enumerator.Current): Don't verify any invariants.
115         (Enumerator.Dispose): Set 'l' to null.
116
117 2009-07-29  Raja R Harinath  <harinath@hurrynot.org>
118
119         * Dictionary.cs (Enumerator.current): New.
120         (Enumerator.MoveNext): Update it.
121         (Enumerator.Current): Don't verify any invariants.
122
123 2009-06-10  Marek Safar <marek.safar@gmail.com>
124
125         * IEqualityComparer.cs, IComparer.cs, IEnumerable.cs,
126         IEnumerator.cs: Add type variance.
127
128 2009-04-02  Jb Evain  <jbevain@novell.com>
129
130         * Dictionary.cs (ValueCollection.CopyTo): fix for copying to
131         an object array. Based on a patch by Tobias Grimm <mono@e-tobi.net>.
132         Fixes bug #328036.
133
134 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
135
136         * Dictionary.cs: Declare the Link struct outside the main class to avoid
137         creating a separate inflated instances for each instantiation of Dictionary.
138
139 2008-11-14  Jb Evain  <jbevain@novell.com>
140
141         * Dictionary.cs (ICollection.CopyTo): fix the different possible
142         copying cases depending on the actual type of destination array,
143         be it an array of KeyValuePair, DictionaryEntry, or object.
144         Fixes #444778.
145
146 2008-11-14  Jb Evain  <jbevain@novell.com>
147
148         * Dictionary.cs: fix ICollection<KeyValuePair<T>>.Remove and .Contains
149         to not only check if the key exists but if the associated value is the
150         good one as well. Fixes #444768.
151
152 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
153
154         * Dictionary.cs (Clear): Clear the linkSlots array as well, as 
155         Enumerator.MoveNext () depends on it. Fixes #432441.
156
157 Fri Oct 3 23:08:06 CEST 2008 Paolo Molaro <lupus@ximian.com>
158
159         * Dictionary.cs: by popular demand, return keys/values in insertion
160         order when possible.
161
162 2008-09-29  Jb Evain  <jbevain@novell.com>
163
164         * Dictionary.cs: check for null argument in ContainsKey.
165         Patch by Jonathan Anderson  <jonathan.l.anderson@gmail.com>
166
167 2008-09-24  Jb Evain  <jbevain@novell.com>
168
169         * Dictionary.cs: properly reset all compounds enumerators.
170         Fixes #429530.
171
172 2008-09-12  Jb Evain  <jbevain@novell.com>
173
174         * Dictionary.cs: (ToTValue) allow null values to be added for non
175         value types TValues to the dictionary when using the
176         non generic IDictionary. Fixes #425693.
177
178 2008-06-16  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
179
180         * String.cs: Dictionary: Do not change the index data when using the indexer for
181         an already existing index. This is somewhat illogical and breakes obscure code situations
182
183 2008-05-29  Juraj Skripsky <js@hotfeet.ch>
184
185         * List.cs (RemoveAll, Shift): Fix leak by clearing empty array
186         items.
187
188 2008-04-29  Juraj Skripsky <js@hotfeet.ch>
189
190         * Dictionary.cs (Clear, Remove): Clear empty slots in keySlots 
191         and valueSlots. Otherwise the garbage collector cannot reclaim 
192         the referenced key/value. Fixes bug #384723.
193
194 2008-04-02  Andreas Nahr  <ClassDevelopment@A-SoftTech.com>
195
196         * KeyNotFoundException.cs
197         * KeyValuePair.cs: Fix parameter names
198
199 2008-03-21  Sebastien Pouliot  <sebastien@ximian.com>
200
201         * EqualityComparer.cs: Add null checks in GetHashCode. Fix bug 
202         #372892
203
204 2007-11-05  Sebastien Pouliot  <sebastien@ximian.com>
205
206         * Dictionary.cs: Ensure that the non-generic CopyTo works on Array.
207         Fix #322783
208
209 2007-10-31  Miguel de Icaza  <miguel@novell.com>
210
211         * Dictionary.cs: Do not increment curTableItem when we return
212         false.   Was not necessary, just a defensive move.
213
214 2007-10-10  Juraj Skripsky <js@hotfeet.ch>
215
216         * Dictionary.cs (Enumerator.MoveNext): Handle the case where we
217         had already reached the end. Fixes bug #332534.
218
219 2007-08-20  Jb Evain  <jbevain@novell.com>
220
221         * List.cs (AddCollection): return early if the collection
222         to be added is empty.
223
224 2007-08-08  Atsushi Enomoto  <atsushi@ximian.com>
225
226         * Dictionary.cs : [Comvisible(true)]->[ComVisible(false)].
227
228 2007-06-23  Marek Safar <marek.safar@gmail.com>
229
230         * List.cs: Make CheckMatch static.
231         
232 2007-06-20  Juraj Skripsky <js@hotfeet.ch>
233
234         * Dictionary.cs: Optimize and add implementation notes. Use a "mini-heap"
235         to store the linked lists instead of the regular heap. Split arrays of
236         structs into separate arrays to make the GC's life simpler (see bug 81879
237         for details). Make class serialization compatible with MS.NET.
238
239         * EqualityComparer.cs: Rename IEquatableOfTEqualityComparer<T> to
240         GenericEqualityComparer<T> to fix binary serialization compatibility
241         with MS.
242
243 2006-04-16  Jonathan Chambers  <joncham@gmail.com>
244
245         * List.cs: Clear entry in RemoveAt after removing item. 
246         Fixes bug #81387.
247         
248 2007-03-27  Alan McGovern <alan.mcgovern@gmail.com>
249
250         * List.cs: Optimized several methods to increase performance
251
252 2007-03-21  Juraj Skripsky <js@hotfeet.ch>
253
254         * List.cs (FindAllStackBits): Small optimization to the new code.
255         Built resulting List<T> directly as an array, wrap it in a List<T>
256         afterwards. Stop the filling of the result array as soon as all
257         matching items have been processed.
258
259 2007-03-20  Juan Cristóbal Olivares <juancri@gmail.com>
260
261         * List.cs (FindAll): Optimize FindAll using a bitmask to determine
262         the number of positive matches, this increases the performance in
263         all cases below 10,000,000 elements extensively:
264
265         100 elements:
266         old method:             00:00:00.0126610 (26x)
267         stackalloc bit method:  00:00:00.0004750 (1x)
268         array bit method:       00:00:00.0010700 (2x)
269         heap bit method:        00:00:00.0038830 (8x)
270
271         1,000 elements:
272         old method:             00:00:00.0139250 (24x)
273         stackalloc bit method:  00:00:00.0005670 (1x)
274         array bit method:       00:00:00.0010890 (2x)
275         heap bit method:        00:00:00.0034920 (6x)
276
277         10,000 elements:
278         old method:             00:00:00.0136110 (12x)
279         stackalloc bit method:  00:00:00.0011240 (1x)
280         array bit method:       00:00:00.0016450 (1.4x)
281         heap bit method:        00:00:00.0043110 (3x)
282
283         50,000 elements:
284         old method:             00:00:00.0175970 (3x)
285         stackalloc bit method:  00:00:00.0085630 (1.5x)
286         array bit method:       00:00:00.0055010 (1x)
287         heap bit method:        00:00:00.0099590 (1.8x)
288
289         100,000 elements:
290         old method:             00:00:00.0210330 (2x)
291         array bit method:       00:00:00.0100430 (1x)
292         heap bit method:        00:00:00.0154150 (1.5x)
293
294         1,000,000 elements:
295         old method:             00:00:00.1243730 (1.2x)
296         array bit method:       00:00:00.0973110 (1x)
297         heap bit method:        00:00:00.1285650 (1.3x)
298
299         10,000,000 elements:
300         old method:             00:00:00.9252570 (1x)
301         array bit method:       00:00:00.9632300 ( 1.05x)
302         heap bit method:        00:00:01.1098490 (1.20x)
303
304 2007-03-08  David Mitchell <dmitchell@logos.com>
305
306         * List.cs: Fix the case where List.set_Item(int index) throws
307         inappropriate exception when index is equal to List.Count
308
309         List.IndexOf(object item) and IList.Contains(object item) throw
310         exceptions when given invalid types.
311
312         IList.Add(object item) throws InvalidCastException when item is
313         not of the correct type.
314
315 2007-03-08  Gert Driesen  <drieseng@users.sourceforge.net>
316
317         * Comparer.cs: Renamed IComparableOfTComparer<T> to GenericComparer<T>
318         to fix binary serialization compatibility with MS.
319
320 2007-03-05  David Mitchell <dmitchell@logos.com>
321
322         * Dictionary.cs: An instance of Dictionary<TKey,TValue> is
323         supposed to throw a KeyNotFoundException when 
324         the user attempts to retrieve the value associated with a key that
325         is not in the dictionary.
326
327         On the other hand, an instance of IDictionary is supposed to
328         return null in similar circumstances.
329
330 2007-03-05  David Mitchell <dmitchell@logos.com>
331
332         * List.cs: Fix InsertRange bug (80930).
333
334 2006-09-15  Gert Driesen  <drieseng@users.sourceforge.net>
335
336         * List.cs: Fixed binary serialization compatibility with MS.NET.
337         Increment version whenever _items is modified; this fixes version
338         checks in Enumerator.
339
340 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
341
342         * Dictionary.cs: Speed up get_Item/set_Item/GetPrev () a bit. Increase capacity
343         specified by the user so 'capacity' elements can really be added without resizing.
344
345 2006-07-12  Zoltan Varga  <vargaz@gmail.com>
346
347         * Dictionary.cs: Swap order of parameters to cmp.Equals () to improve 
348         compatibility with MS.NET and strange Equals () implementations.        
349
350 2006-05-17  Kazuki Oikawa  <kazuki@panicode.com>
351
352         * List.cs : implemented Sort(Comparison <T>).
353
354 2006-05-08  Atsushi Enomoto  <atsushi@ximian.com>
355
356         * List.cs : use proper comparer in Contains(), IndexOf() and
357           LastIndexOf(). Patch by Kazuki Oikawa. Fixed bug #77277.
358
359 2006-03-16  Ankit Jain  <jankit@novell.com>
360
361         * List.cs (CheckIndex): Check for -ve indices and allow index == size.
362         (Insert): Use CheckIndex.
363
364 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
365
366         * List.cs: Applied patch from <kazuki@panicode.com>. Fixes #77504.
367
368 2006-02-10  Martin Baulig  <martin@ximian.com>
369
370         * Comparer.cs
371         (IComparableOfTComparer): `T' must implement `IComparable<T>' and
372         not `IComparable'.
373
374 Tue Jan 24 18:22:54 CET 2006 Paolo Molaro <lupus@ximian.com>
375
376         * Dictionary.cs: avoid long reminder operations.
377
378 2006-01-23  Raja R Harinath  <rharinath@novell.com>
379
380         Speed up remove.  Use 'dict[k]=v' as a self-tuning hint.
381         * Dictionary.cs (GetSlot): Move data-structure traversal to ...
382         (GetPrev): ... this.  Returns the slot prior to the place we're
383         looking for, or null if that place is the head of the chain.
384         (Remove): Use it.
385         (this.set): Use it.  Implement move-to-front on set.
386
387         * Dictionary.cs (ToTKey, ToTValue): New helpers to convert from
388         type 'object'.
389         (IDictionary.this, IDictionary.Add): Use them.
390         (IDictionary.Contains, IDictionary.Remove): If the types don't
391         match, do nothing.
392
393 2006-01-19  Raja R Harinath  <rharinath@novell.com>
394
395         Fix to pass new nunit tests.
396         * Dictionary.cs (ShimEnumerator): New class.  Implement the
397         requirement that ((IDictionary) foo).GetEnumerator ().Current has
398         type DictionaryEntry.
399         (IDictionary.GetEnumerator): Use ShimEnumerator.
400         (Enumerator.Current): Now has type KeyValuePair<TKey, TValue>.
401         (Enumerator.MoveNext): Use VerifyState.
402         (Enumerator.VerifyState): Move validation of 'current' field to ...
403         (Enumerator.CurrentSlot): ... this.
404         (Enumerator.Current, Enumerator.IDictionaryEnumerator.Entry):
405         Use CurrentSlot.
406         (CopyTo, ICollection.CopyTo): Use subtle reasoning to replace a
407         '>=' with a '>'.  Don't throw an ArgumentException when
408         index==array.Length && Count==0.
409         (KeyCollection.CopyTo, ValueCollection.CopyTo): Likewise, and thus
410         obviate the need to check (dictionary.Count == 0).
411
412 2005-12-20  Sebastien Pouliot  <sebastien@ximian.com>
413
414         * List.cs: Applied Atsushi's patch for Sort (bug 76361) now that the
415         generic versions of Array.Sort are implemented.
416
417 2005-12-19  Sebastien Pouliot  <sebastien@ximian.com>
418
419         * Dictionary.cs: Added [Serializable] attribute to both inner 
420         Enumerator struct in Key and Value inner collection classes.
421         * EqualityComparer.cs: Added missing IEqualityComparer interface.
422         * List.cs: Added [Serializable] attribute to both inner Enumerator
423         struct.
424
425 2005-12-19  Sebastien Pouliot  <sebastien@ximian.com> 
426  
427         * Dictionary.cs: Fixed ICollection.CopyTo to use DictionaryEntry. Fixed
428         Key and Value CopyTo not to throw exception if the dictionary is empty
429         (fix bug #77019).
430         * List.cs: Fix exception reporting to match MS behaviour (2.0 final).
431
432 2005-11-19  Zoltan Varga  <vargaz@gmail.com>
433
434         * KeyNotFoundException.cs: Add default message.
435
436 2005-09-18  Miguel de Icaza  <miguel@novell.com>
437
438         * Dictionary.cs: Change style for internal fields.
439
440         If the capacity is zero, set the capacity to our default size as 0
441         is an allowed parameter in .NET
442
443 2005-08-10  Kamil Skalski  <nazgul@nemerle.org>
444
445         * KeyValuePair.cs, Dictionary.cs: Change Key and Value to properties to match
446         .NET 2.0 July CTP. Update its use in Dictionary, since now we
447         cannot write to them.
448         
449 2005-07-10  Kamil Skalski <nazgul@nemerle.org>
450
451         * Comparer.cs, EqualityComparer.cs: Use MakeGenericType instead of BindGenericParameters.
452
453
454 2005-06-27  Raja R Harinath  <rharinath@novell.com>
455
456         Introduce some thread-safety by removing the modify-on-read
457         move-to-front heuristic.
458         * Dictionary.cs (_enumeratorGeneration, _enumerators): Remove.
459         (Count): Add internal property set.  Invalidate enumerators when
460         Count is changed.  Change all references of _usedSlots to Count.
461         (this): Invalidate enumerators when the value of some slot is
462         changed, even if the layout of the data-structure isn't modified.
463         (DoHash): Remove null-key check.  All codepaths leading to this
464         function already have the check.
465         (GetSlot): Remove move-to-front heuristic.
466         (Remove): Update.
467
468 2005-06-24  Martin Baulig  <martin@ximian.com>
469
470         * IDictionary.cs: Use the same type parameter names than on MS.
471
472         * IDictionary.cs, Dictionary.cs: We don't need the `CLSCompliant'
473         attribute here.
474
475 2005-06-23  Martin Baulig  <martin@ximian.com>
476
477         * *.cs: Removed the `[ComVisible(false)]' attributes everywhere.
478
479 2005-06-22  Raja R Harinath  <rharinath@novell.com>
480
481         * Dictionary.cs (_generation, _enumeratorGeneration, _enumerators):
482         New fields to implement fail-fast semantics.  All code that
483         modifies the table increment _generation.
484         (GetSlot): Use _hcp to compare keys.  Return the slot containing
485         the key, rather than the index.  Avoid move-to-front heuristic
486         when there's an enumerator coursing through the table.
487         (this, Add, TryGetValue, ContainsKey, Remove): Update to change.
488         (Enumerator.Enumerator): Save the generation of the dictionary.
489         (Enumerator.Dispose): Inform dictionary that the enumerator is no more.
490         (Enumerator.MoveNext, Enumerator.VerifyState): Fail if the
491         dictionary has been modified.
492
493 2005-06-20  David waite  <mass@akuma.org>
494
495         * List.cs : substantial changes and optimizations
496         (AddCollection, AddEnumerable): new internal specializations of AddRange
497         (AsReadOnly): returns specific IList<T> to match ms.net 2.0b2 api.
498         (Clear): reset size to zero on clear
499         (ConvertAll): catch null converter, use Add to prevent OutOfBounds
500         exception
501         (FindAll, FindIndex, FindLast, FindLastIndex, RemoveAll, TrueForAll): 
502         check for null match
503         (FindLastIndex): correct index parameters based on ms.net 2005b2 behavior
504         (ForEach): catch null action
505         (CheckIndex): new internal function similar to CheckRange for functions
506         which only provide a starting index
507         (InsertCollection, InsertEnumerable): new internal specializations of
508         InsertRange
509         (ReadOnlyList): removed, ReadOnlyCollection in 
510         System.Collections.ObjectModel is used instead now 
511     
512 2005-06-16  David Waite  <mass@akuma.org>
513
514         * Dictionary.cs (EnumerationMode): Remove.
515         (Enumerator): Remove return type flag - legacy return is expected to
516         always return a DictionaryEntry
517         (Enumerator): Make constructor internal, it is not public on ms.net 
518         beta 2
519         (VerifyState): Added method to check state preconditions and throw
520         appropriate exceptions.
521         (KeyCollection,ValueCollection): Mark sealed to match ms.net beta 2
522         (KeyCollection.Enumerator._hostEnumerator): make exact struct type,
523         rather than boxing and using by interface
524         (KeyCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
525         (ValueCollection.Enumerator._hostEnumerator): make exact struct type,
526         rather than boxing and using by interface
527         (ValueCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
528         * EqualityComparer.cs (DefaultComparer, IEquatableOfTEqualityComparer):
529         Mark as serializable.
530
531 2005-06-16  Raja R Harinath  <rharinath@novell.com>
532
533         * Dictionary.cs (GetKeys, GetValues): Remove.
534         (SetThreshold): New function to calculate the resize threshold.
535         (CopyTo): Don't use foreach syntax.
536         (ContainsValue): Likewise.  Use default equality comparer of the
537         value type.
538         (GetObjectData): Use CopyTo to copy into temporary array.  Don't
539         save redundant _usedSlots and _threshold.
540         (OnDeserialization): Rewrite.
541         (ICollection<>.CopyTo): Forward to CopyTo.
542         (Enumerator._nextIndex): Rename to from _index.
543         (Enumerator._next, Enumerator.FixNext): Remove.
544         (Enumerator.Current): Rewrite to avoid need for _next.
545         (Enumerator.IEnumerator.Reset): Update.
546         (KeyCollection): Is also IEnumerable<TKey> and IEnumerable.
547         Update methods to conform to standard.
548         (KeyCollection.GetEnumerator): Restore.  Return the correct type.
549         (KeyCollection.Enumerator): Rename from KeyEnumerator.  Simple
550         wrapper that forwards to Dictionary<,>.Enumerator.
551         (ValueCollection): Likewise.
552
553 2005-06-12  David Waite  <dwaite@gmail.com>
554
555         * IKeyComparer.cs: removed
556         * KeyValuePair.cs: add same-style ToString as ms.net Beta2 impl,
557         make Serializable, use correct field names.
558         * Dictionary.cs: Miscelaneus clean-ups, added serialization
559         support, use Hashtable prime functions
560
561 2005-06-12  Ben Maurer  <bmaurer@ximian.com>
562
563         * Comparer.cs, EqualityComparer.cs: Important performance hack:
564         make sure that we don't box stuff and do reflection on every
565         comparison. We use reflection at cctor time rather than on every
566         request.
567
568 2005-06-09  Raja R Harinath  <rharinath@novell.com>
569
570         Simplify Enumerator.MoveNext to make it "obviously correct", rather
571         than require subtle reasoning about the state of various variables.
572         * Dictionary.cs (Enumerator._isValid): Remove.  Replace all uses
573         with "_current == null".
574         (Enumerator._validNodeVisited): Remove.
575         (Enumerator._next): New.  Holds the the next position.
576         (Enumerator.FixNest): New helper function that ensures that _next
577         has the right value.
578         (Enumerator.MoveNext): Simplify.  Now, copies _next to _current
579         and advances _next if possible.
580
581 2005-06-08  Martin Baulig  <martin@ximian.com>
582
583         * Dictionary.cs (Dictionary.KeyEnumerator): Removed the public
584         GetEnumerator() function since it's returning the wrong type.
585         (Dictionary.ValueEnumerator): Likewise.  Fix #75073.
586
587 2005-06-08  Ankit Jain <ankit@corewars.org>
588
589         * Dictionary.cs (Dictionary<TKey, TValue>.MoveNext): Allow traversal of chain in last slot
590         of the table. Fixes #75168.
591
592 2005-06-04  Ben Maurer  <bmaurer@ximian.com>
593
594         * *.cs: 2.0 api fixups
595
596 2005-05-26  Miguel de Icaza  <miguel@novell.com>
597
598         * Dictionary.cs: Remove the `Hash' name from the Dictionary
599         internal classes, make them public.
600
601 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
602
603         * Dictionary.cs: Fix a warning.
604
605         * IDictionary.cs: Add missing TryGetValue method.
606
607 2005-05-19  Geoff Norton  <gnorton@customerdna.com>
608
609         * List.cs (Insert): Resize the array before the shift if needed
610
611 2005-05-18  Miguel de Icaza  <miguel@novell.com>
612
613         * List.cs (GetRange): Implement.
614
615         Do not do lazy loading of data.  Not worth adding an
616         extra check, and not worth the bugs. 
617
618         This decision wont be discussed until: a) a full List regression
619         test suite exists and  b) performance benchmarks are created.  (b)
620         depends on (a) or the argument wont even be heard. 
621
622 2005-05-13  Atsushi Enomoto  <atsushi@ximian.com>
623
624         * Queue.cs, Stack.cs: moved to System.dll
625
626 2005-05-06  Martin Baulig  <martin@ximian.com>
627
628         * *.cs: Add CLSCompliant(true) where missing.
629
630 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
631
632         * *.cs: Remove CLSCompliant(false) attributes.
633
634 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
635
636         * List.cs: Applied patch from Mart Roosmaa (roosmaa@gmail.com). 
637         Fix Insert method. Fixes #74824.
638
639 2005-04-29  Martin Baulig  <martin@ximian.com>
640
641         Reflect latest spec changes.
642
643         * IEnumerable.cs (IEnumerable<T>): Implement IEnumerable.
644         * IEnumerator.cs (IEnumerator<T>): Implement IEnumerator.
645
646 2005-04-29  Raja R Harinath  <rharinath@novell.com>
647
648         Remove FIXME.
649         * Dictionary.cs (Slot<K,V>): Move to ...
650         (Dictionary<K,V>.Slot): ... here.
651
652 2005-04-28  Martin Baulig  <martin@ximian.com>
653
654         * Dictionary.cs, Queue.cs, Stack.cs, List.cs, Comparer.cs: Don't
655         duplicate type parameters in the nested classes.
656
657 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
658
659         * List.cs: Fix ToArray () method. Fixes #74675.
660
661 2005-04-04  Raja R Harinath  <rharinath@novell.com>
662
663         * Dictionary.cs: Update to draft of Feb 27.  Add some argument checks.
664         (GetSlot): Don't throw KeyNotFoundException.  Unify all list
665         traversals in here.  Move found key to head of chain, and return
666         the index of the chain suitable for/containing the key.
667         (Item, Add, Remove): Simplify, and remove FIXMEs.
668         (Resize): Reuse linked list nodes from old table.
669         (Dictionary.CopyTo, HashKeyCollection.CopyTo, HashValueCollection.CopyTo):
670         Add some argument checks.
671
672 2005-04-02  Ben Maurer  <bmaurer@ximian.com>
673
674         * Dictionary.cs: Real impl.
675
676 2005-02-21  Martin Baulig  <martin@ximian.com>
677
678         * IComparer.cs: Reverted the last change here, Equals() and
679         GetHashCode() have been removed a long time ago.
680
681 2005-02-21  Kazuki Oikawa  <kazuki@panicode.com>
682
683         * IComparer.cs, IDictionary.cs: Corrected the wrong declaration.
684
685 2005-02-11  Carlos Alberto Cortez <calberto.cortez@gmail.com>
686
687         * List.cs: Added internal ReadOnlyCollection class,
688         which is a wrapper for a read only IList<T> version of the List<T>.
689         Used in AsReadOnly () method.
690         
691 2005-02-07  Ben Maurer  <bmaurer@ximian.com>
692
693         * List.cs (CheckRange): Comparison error. Duh!
694         (Shift): really deal with neg. delta. Also, adjust the `size'.
695
696         Based on a patch from Marc Denty (marc.denty@libertysurf.fr).
697
698         Fixes #72258.
699
700 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
701
702         * Queue.cs: `duh' bugs.
703
704 2004-12-27  Ben Maurer  <bmaurer@ximian.com>
705
706         * Stack.cs: Stupid bug fixes.
707
708         * List.cs: My new (mostly untested ;-) impl of List
709         <T>. Implements most of the API.
710
711 2004-12-26  Ben Maurer  <bmaurer@ximian.com>
712
713         * Queue.cs: New, non-linked-list based impl.
714
715 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
716
717         * Comparer.cs: Update this class.
718
719 2004-11-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
720
721         * List.cs: Enumerator changed to behave like the MS impl.
722         
723 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
724
725         * Stack.cs: New, list based impl. Waiting for some gmcs fixes.
726
727 2004-11-10  Martin Baulig  <martin@ximian.com>
728
729         * IDictionary.cs (IDictionary): `IsReadOnly' and `Clear' are
730         inherited from ICollection.
731
732 2004-09-20  Gert Driesen <drieseng@users.sourceforge.net>
733
734         * ReadOnlyCollection.cs: Moved to System assembly
735         * Collection.cs: Moved to System assembly
736
737 2004-09-07  Carlos Alberto Cortez <carlos@unixmexico.org>
738
739         * ReadOnlyCollection.cs: New file and changes to 
740         Collection.cs tu support it.
741
742 2004-09-05  Marek Safar <marek.safar@seznam.cz>
743
744         * Dictionary.cs: Added new file (no implementation).
745
746 2004-09-03  Carlos Alberto Cortez <carlos@unixmexico.org>
747
748         * Collection.cs: Small improvements related to
749         style, resizing, and type checking.
750
751 2004-09-01  Carlos Alberto Cortez <carlos@unixmexico.org>
752
753         * Collection.cs: New file.
754
755 2004-08-04  Martin Baulig  <martin@ximian.com>
756
757         * List.cs (List<T>.Enumerator): Made this a struct.
758         (List<T>.GetEnumerator): The public method now returns the
759         `Enumerator' struct.
760
761 2004-08-02  Martin Baulig  <martin@ximian.com>
762
763         Started to do some API review.
764
765         * ICollection.cs (ICollection<T>): Added IsReadOnly, Add, Clear,
766         Contains and Remove.
767
768         * IList.cs (IList<T>): Removed Add, Clear, Constains, Remove,
769         IsReadOnly and IsFixedSize.
770
771 2004-08-02  Martin Baulig  <martin@ximian.com>
772
773         * IList.cs (IList.Add): Changed return type to void.
774
775         * List.cs (List.Add): Likewise.
776
777 2004-07-16  Martin Baulig  <martin@ximian.com>
778
779         * IComparable.cs: Removed, it's in System.
780
781 2004-07-12  Duncan Mak  <duncan@ximian.com>
782
783         * KeyNotFoundException.cs: Added.
784
785 2004-06-18  Ben Maurer  <bmaurer@ximian.com>
786
787         * Comparer.cs: v2 impl. Some workarounds for gmcs are enabled.
788
789 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
790
791         * Queue.cs: Fixed possible integer overflow in CopyTo methods.
792         * Stack.cs: Fixed possible integer overflow in CopyTo methods.
793
794 2004-03-13  Martin Baulig  <martin@ximian.com>
795
796         * Stack.cs, Queue.cs, List.cs: Implement the non-generic interfaces.
797
798 2004-03-11  Martin Baulig  <martin@ximian.com>
799
800         * List.cs: New file.
801
802 2004-03-11  Martin Baulig  <martin@ximian.com>
803
804         * Stack.cs, Queue.cs: Just use `Node' for the nested class, not
805         `Node<T>' (which would create another type parameter `T'
806         overriding `T' from the outer class).   
807
808 2004-02-23  Martin Baulig  <martin@ximian.com>
809
810         * Stack.cs, Queue.cs: New files.  Hmm, looks like I forgot to add
811         them to CVS; they're already on my hard disk since December or so.
812
813 2003-12-08  Martin Baulig  <martin@ximian.com>
814
815         * *.cs: require GENERICS.
816
817 2003-11-08 Ben Maurer  <bmaurer@users.sourceforge.net>
818
819         * *.cs: require NET_2_0 and GENERICS
820
821 2003-11-07 Ben Maurer  <bmaurer@users.sourceforge.net>
822
823         * IComparable.cs, IComparer.cs, IDictionary.cs, IKeyComparer.cs, KeyValuePair.cs
824         Added.
825
826 2003-11-06  Martin Baulig  <martin@ximian.com>
827
828         * ICollection.cs, IList.cs, IEnumerator.cs, IEnumerable.cs:
829         Started to implement the System.Collections.Generic classes.
830