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