Mark tests as not working under TARGET_JVM
[mono.git] / mcs / class / corlib / System.Collections.Generic / ChangeLog
1 2007-03-08  David Mitchell <dmitchell@logos.com>
2
3         * List.cs: Fix the case where List.set_Item(int index) throws
4         inappropriate exception when index is equal to List.Count
5
6         List.IndexOf(object item) and IList.Contains(object item) throw
7         exceptions when given invalid types.
8
9         IList.Add(object item) throws InvalidCastException when item is
10         not of the correct type.
11
12 2007-03-08  Gert Driesen  <drieseng@users.sourceforge.net>
13
14         * Comparer.cs: Renamed IComparableOfTComparer<T> to GenericComparer<T>
15         to fix binary serialization compatibility with MS.
16
17 2007-03-05  David Mitchell <dmitchell@logos.com>
18
19         * Dictionary.cs: An instance of Dictionary<TKey,TValue> is
20         supposed to throw a KeyNotFoundException when 
21         the user attempts to retrieve the value associated with a key that
22         is not in the dictionary.
23
24         On the other hand, an instance of IDictionary is supposed to
25         return null in similar circumstances.
26
27 2007-03-05  David Mitchell <dmitchell@logos.com>
28
29         * List.cs: Fix InsertRange bug (80930).
30
31 2006-09-15  Gert Driesen  <drieseng@users.sourceforge.net>
32
33         * List.cs: Fixed binary serialization compatibility with MS.NET.
34         Increment version whenever _items is modified; this fixes version
35         checks in Enumerator.
36
37 2006-09-06  Zoltan Varga  <vargaz@gmail.com>
38
39         * Dictionary.cs: Speed up get_Item/set_Item/GetPrev () a bit. Increase capacity
40         specified by the user so 'capacity' elements can really be added without resizing.
41
42 2006-07-12  Zoltan Varga  <vargaz@gmail.com>
43
44         * Dictionary.cs: Swap order of parameters to cmp.Equals () to improve 
45         compatibility with MS.NET and strange Equals () implementations.        
46
47 2006-05-17  Kazuki Oikawa  <kazuki@panicode.com>
48
49         * List.cs : implemented Sort(Comparison <T>).
50
51 2006-05-08  Atsushi Enomoto  <atsushi@ximian.com>
52
53         * List.cs : use proper comparer in Contains(), IndexOf() and
54           LastIndexOf(). Patch by Kazuki Oikawa. Fixed bug #77277.
55
56 2006-03-16  Ankit Jain  <jankit@novell.com>
57
58         * List.cs (CheckIndex): Check for -ve indices and allow index == size.
59         (Insert): Use CheckIndex.
60
61 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
62
63         * List.cs: Applied patch from <kazuki@panicode.com>. Fixes #77504.
64
65 2006-02-10  Martin Baulig  <martin@ximian.com>
66
67         * Comparer.cs
68         (IComparableOfTComparer): `T' must implement `IComparable<T>' and
69         not `IComparable'.
70
71 Tue Jan 24 18:22:54 CET 2006 Paolo Molaro <lupus@ximian.com>
72
73         * Dictionary.cs: avoid long reminder operations.
74
75 2006-01-23  Raja R Harinath  <rharinath@novell.com>
76
77         Speed up remove.  Use 'dict[k]=v' as a self-tuning hint.
78         * Dictionary.cs (GetSlot): Move data-structure traversal to ...
79         (GetPrev): ... this.  Returns the slot prior to the place we're
80         looking for, or null if that place is the head of the chain.
81         (Remove): Use it.
82         (this.set): Use it.  Implement move-to-front on set.
83
84         * Dictionary.cs (ToTKey, ToTValue): New helpers to convert from
85         type 'object'.
86         (IDictionary.this, IDictionary.Add): Use them.
87         (IDictionary.Contains, IDictionary.Remove): If the types don't
88         match, do nothing.
89
90 2006-01-19  Raja R Harinath  <rharinath@novell.com>
91
92         Fix to pass new nunit tests.
93         * Dictionary.cs (ShimEnumerator): New class.  Implement the
94         requirement that ((IDictionary) foo).GetEnumerator ().Current has
95         type DictionaryEntry.
96         (IDictionary.GetEnumerator): Use ShimEnumerator.
97         (Enumerator.Current): Now has type KeyValuePair<TKey, TValue>.
98         (Enumerator.MoveNext): Use VerifyState.
99         (Enumerator.VerifyState): Move validation of 'current' field to ...
100         (Enumerator.CurrentSlot): ... this.
101         (Enumerator.Current, Enumerator.IDictionaryEnumerator.Entry):
102         Use CurrentSlot.
103         (CopyTo, ICollection.CopyTo): Use subtle reasoning to replace a
104         '>=' with a '>'.  Don't throw an ArgumentException when
105         index==array.Length && Count==0.
106         (KeyCollection.CopyTo, ValueCollection.CopyTo): Likewise, and thus
107         obviate the need to check (dictionary.Count == 0).
108
109 2005-12-20  Sebastien Pouliot  <sebastien@ximian.com>
110
111         * List.cs: Applied Atsushi's patch for Sort (bug 76361) now that the
112         generic versions of Array.Sort are implemented.
113
114 2005-12-19  Sebastien Pouliot  <sebastien@ximian.com>
115
116         * Dictionary.cs: Added [Serializable] attribute to both inner 
117         Enumerator struct in Key and Value inner collection classes.
118         * EqualityComparer.cs: Added missing IEqualityComparer interface.
119         * List.cs: Added [Serializable] attribute to both inner Enumerator
120         struct.
121
122 2005-12-19  Sebastien Pouliot  <sebastien@ximian.com> 
123  
124         * Dictionary.cs: Fixed ICollection.CopyTo to use DictionaryEntry. Fixed
125         Key and Value CopyTo not to throw exception if the dictionary is empty
126         (fix bug #77019).
127         * List.cs: Fix exception reporting to match MS behaviour (2.0 final).
128
129 2005-11-19  Zoltan Varga  <vargaz@gmail.com>
130
131         * KeyNotFoundException.cs: Add default message.
132
133 2005-09-18  Miguel de Icaza  <miguel@novell.com>
134
135         * Dictionary.cs: Change style for internal fields.
136
137         If the capacity is zero, set the capacity to our default size as 0
138         is an allowed parameter in .NET
139
140 2005-08-10  Kamil Skalski  <nazgul@nemerle.org>
141
142         * KeyValuePair.cs, Dictionary.cs: Change Key and Value to properties to match
143         .NET 2.0 July CTP. Update its use in Dictionary, since now we
144         cannot write to them.
145         
146 2005-07-10  Kamil Skalski <nazgul@nemerle.org>
147
148         * Comparer.cs, EqualityComparer.cs: Use MakeGenericType instead of BindGenericParameters.
149
150
151 2005-06-27  Raja R Harinath  <rharinath@novell.com>
152
153         Introduce some thread-safety by removing the modify-on-read
154         move-to-front heuristic.
155         * Dictionary.cs (_enumeratorGeneration, _enumerators): Remove.
156         (Count): Add internal property set.  Invalidate enumerators when
157         Count is changed.  Change all references of _usedSlots to Count.
158         (this): Invalidate enumerators when the value of some slot is
159         changed, even if the layout of the data-structure isn't modified.
160         (DoHash): Remove null-key check.  All codepaths leading to this
161         function already have the check.
162         (GetSlot): Remove move-to-front heuristic.
163         (Remove): Update.
164
165 2005-06-24  Martin Baulig  <martin@ximian.com>
166
167         * IDictionary.cs: Use the same type parameter names than on MS.
168
169         * IDictionary.cs, Dictionary.cs: We don't need the `CLSCompliant'
170         attribute here.
171
172 2005-06-23  Martin Baulig  <martin@ximian.com>
173
174         * *.cs: Removed the `[ComVisible(false)]' attributes everywhere.
175
176 2005-06-22  Raja R Harinath  <rharinath@novell.com>
177
178         * Dictionary.cs (_generation, _enumeratorGeneration, _enumerators):
179         New fields to implement fail-fast semantics.  All code that
180         modifies the table increment _generation.
181         (GetSlot): Use _hcp to compare keys.  Return the slot containing
182         the key, rather than the index.  Avoid move-to-front heuristic
183         when there's an enumerator coursing through the table.
184         (this, Add, TryGetValue, ContainsKey, Remove): Update to change.
185         (Enumerator.Enumerator): Save the generation of the dictionary.
186         (Enumerator.Dispose): Inform dictionary that the enumerator is no more.
187         (Enumerator.MoveNext, Enumerator.VerifyState): Fail if the
188         dictionary has been modified.
189
190 2005-06-20  David waite  <mass@akuma.org>
191
192         * List.cs : substantial changes and optimizations
193         (AddCollection, AddEnumerable): new internal specializations of AddRange
194         (AsReadOnly): returns specific IList<T> to match ms.net 2.0b2 api.
195         (Clear): reset size to zero on clear
196         (ConvertAll): catch null converter, use Add to prevent OutOfBounds
197         exception
198         (FindAll, FindIndex, FindLast, FindLastIndex, RemoveAll, TrueForAll): 
199         check for null match
200         (FindLastIndex): correct index parameters based on ms.net 2005b2 behavior
201         (ForEach): catch null action
202         (CheckIndex): new internal function similar to CheckRange for functions
203         which only provide a starting index
204         (InsertCollection, InsertEnumerable): new internal specializations of
205         InsertRange
206         (ReadOnlyList): removed, ReadOnlyCollection in 
207         System.Collections.ObjectModel is used instead now 
208     
209 2005-06-16  David Waite  <mass@akuma.org>
210
211         * Dictionary.cs (EnumerationMode): Remove.
212         (Enumerator): Remove return type flag - legacy return is expected to
213         always return a DictionaryEntry
214         (Enumerator): Make constructor internal, it is not public on ms.net 
215         beta 2
216         (VerifyState): Added method to check state preconditions and throw
217         appropriate exceptions.
218         (KeyCollection,ValueCollection): Mark sealed to match ms.net beta 2
219         (KeyCollection.Enumerator._hostEnumerator): make exact struct type,
220         rather than boxing and using by interface
221         (KeyCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
222         (ValueCollection.Enumerator._hostEnumerator): make exact struct type,
223         rather than boxing and using by interface
224         (ValueCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
225         * EqualityComparer.cs (DefaultComparer, IEquatableOfTEqualityComparer):
226         Mark as serializable.
227
228 2005-06-16  Raja R Harinath  <rharinath@novell.com>
229
230         * Dictionary.cs (GetKeys, GetValues): Remove.
231         (SetThreshold): New function to calculate the resize threshold.
232         (CopyTo): Don't use foreach syntax.
233         (ContainsValue): Likewise.  Use default equality comparer of the
234         value type.
235         (GetObjectData): Use CopyTo to copy into temporary array.  Don't
236         save redundant _usedSlots and _threshold.
237         (OnDeserialization): Rewrite.
238         (ICollection<>.CopyTo): Forward to CopyTo.
239         (Enumerator._nextIndex): Rename to from _index.
240         (Enumerator._next, Enumerator.FixNext): Remove.
241         (Enumerator.Current): Rewrite to avoid need for _next.
242         (Enumerator.IEnumerator.Reset): Update.
243         (KeyCollection): Is also IEnumerable<TKey> and IEnumerable.
244         Update methods to conform to standard.
245         (KeyCollection.GetEnumerator): Restore.  Return the correct type.
246         (KeyCollection.Enumerator): Rename from KeyEnumerator.  Simple
247         wrapper that forwards to Dictionary<,>.Enumerator.
248         (ValueCollection): Likewise.
249
250 2005-06-12  David Waite  <dwaite@gmail.com>
251
252         * IKeyComparer.cs: removed
253         * KeyValuePair.cs: add same-style ToString as ms.net Beta2 impl,
254         make Serializable, use correct field names.
255         * Dictionary.cs: Miscelaneus clean-ups, added serialization
256         support, use Hashtable prime functions
257
258 2005-06-12  Ben Maurer  <bmaurer@ximian.com>
259
260         * Comparer.cs, EqualityComparer.cs: Important performance hack:
261         make sure that we don't box stuff and do reflection on every
262         comparison. We use reflection at cctor time rather than on every
263         request.
264
265 2005-06-09  Raja R Harinath  <rharinath@novell.com>
266
267         Simplify Enumerator.MoveNext to make it "obviously correct", rather
268         than require subtle reasoning about the state of various variables.
269         * Dictionary.cs (Enumerator._isValid): Remove.  Replace all uses
270         with "_current == null".
271         (Enumerator._validNodeVisited): Remove.
272         (Enumerator._next): New.  Holds the the next position.
273         (Enumerator.FixNest): New helper function that ensures that _next
274         has the right value.
275         (Enumerator.MoveNext): Simplify.  Now, copies _next to _current
276         and advances _next if possible.
277
278 2005-06-08  Martin Baulig  <martin@ximian.com>
279
280         * Dictionary.cs (Dictionary.KeyEnumerator): Removed the public
281         GetEnumerator() function since it's returning the wrong type.
282         (Dictionary.ValueEnumerator): Likewise.  Fix #75073.
283
284 2005-06-08  Ankit Jain <ankit@corewars.org>
285
286         * Dictionary.cs (Dictionary<TKey, TValue>.MoveNext): Allow traversal of chain in last slot
287         of the table. Fixes #75168.
288
289 2005-06-04  Ben Maurer  <bmaurer@ximian.com>
290
291         * *.cs: 2.0 api fixups
292
293 2005-05-26  Miguel de Icaza  <miguel@novell.com>
294
295         * Dictionary.cs: Remove the `Hash' name from the Dictionary
296         internal classes, make them public.
297
298 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
299
300         * Dictionary.cs: Fix a warning.
301
302         * IDictionary.cs: Add missing TryGetValue method.
303
304 2005-05-19  Geoff Norton  <gnorton@customerdna.com>
305
306         * List.cs (Insert): Resize the array before the shift if needed
307
308 2005-05-18  Miguel de Icaza  <miguel@novell.com>
309
310         * List.cs (GetRange): Implement.
311
312         Do not do lazy loading of data.  Not worth adding an
313         extra check, and not worth the bugs. 
314
315         This decision wont be discussed until: a) a full List regression
316         test suite exists and  b) performance benchmarks are created.  (b)
317         depends on (a) or the argument wont even be heard. 
318
319 2005-05-13  Atsushi Enomoto  <atsushi@ximian.com>
320
321         * Queue.cs, Stack.cs: moved to System.dll
322
323 2005-05-06  Martin Baulig  <martin@ximian.com>
324
325         * *.cs: Add CLSCompliant(true) where missing.
326
327 2005-05-06  Zoltan Varga  <vargaz@freemail.hu>
328
329         * *.cs: Remove CLSCompliant(false) attributes.
330
331 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
332
333         * List.cs: Applied patch from Mart Roosmaa (roosmaa@gmail.com). 
334         Fix Insert method. Fixes #74824.
335
336 2005-04-29  Martin Baulig  <martin@ximian.com>
337
338         Reflect latest spec changes.
339
340         * IEnumerable.cs (IEnumerable<T>): Implement IEnumerable.
341         * IEnumerator.cs (IEnumerator<T>): Implement IEnumerator.
342
343 2005-04-29  Raja R Harinath  <rharinath@novell.com>
344
345         Remove FIXME.
346         * Dictionary.cs (Slot<K,V>): Move to ...
347         (Dictionary<K,V>.Slot): ... here.
348
349 2005-04-28  Martin Baulig  <martin@ximian.com>
350
351         * Dictionary.cs, Queue.cs, Stack.cs, List.cs, Comparer.cs: Don't
352         duplicate type parameters in the nested classes.
353
354 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
355
356         * List.cs: Fix ToArray () method. Fixes #74675.
357
358 2005-04-04  Raja R Harinath  <rharinath@novell.com>
359
360         * Dictionary.cs: Update to draft of Feb 27.  Add some argument checks.
361         (GetSlot): Don't throw KeyNotFoundException.  Unify all list
362         traversals in here.  Move found key to head of chain, and return
363         the index of the chain suitable for/containing the key.
364         (Item, Add, Remove): Simplify, and remove FIXMEs.
365         (Resize): Reuse linked list nodes from old table.
366         (Dictionary.CopyTo, HashKeyCollection.CopyTo, HashValueCollection.CopyTo):
367         Add some argument checks.
368
369 2005-04-02  Ben Maurer  <bmaurer@ximian.com>
370
371         * Dictionary.cs: Real impl.
372
373 2005-02-21  Martin Baulig  <martin@ximian.com>
374
375         * IComparer.cs: Reverted the last change here, Equals() and
376         GetHashCode() have been removed a long time ago.
377
378 2005-02-21  Kazuki Oikawa  <kazuki@panicode.com>
379
380         * IComparer.cs, IDictionary.cs: Corrected the wrong declaration.
381
382 2005-02-11  Carlos Alberto Cortez <calberto.cortez@gmail.com>
383
384         * List.cs: Added internal ReadOnlyCollection class,
385         which is a wrapper for a read only IList<T> version of the List<T>.
386         Used in AsReadOnly () method.
387         
388 2005-02-07  Ben Maurer  <bmaurer@ximian.com>
389
390         * List.cs (CheckRange): Comparison error. Duh!
391         (Shift): really deal with neg. delta. Also, adjust the `size'.
392
393         Based on a patch from Marc Denty (marc.denty@libertysurf.fr).
394
395         Fixes #72258.
396
397 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
398
399         * Queue.cs: `duh' bugs.
400
401 2004-12-27  Ben Maurer  <bmaurer@ximian.com>
402
403         * Stack.cs: Stupid bug fixes.
404
405         * List.cs: My new (mostly untested ;-) impl of List
406         <T>. Implements most of the API.
407
408 2004-12-26  Ben Maurer  <bmaurer@ximian.com>
409
410         * Queue.cs: New, non-linked-list based impl.
411
412 2004-11-29  Ben Maurer  <bmaurer@ximian.com>
413
414         * Comparer.cs: Update this class.
415
416 2004-11-25  Carlos Alberto Cortez <calberto.cortez@gmail.com>
417
418         * List.cs: Enumerator changed to behave like the MS impl.
419         
420 2004-11-25  Ben Maurer  <bmaurer@ximian.com>
421
422         * Stack.cs: New, list based impl. Waiting for some gmcs fixes.
423
424 2004-11-10  Martin Baulig  <martin@ximian.com>
425
426         * IDictionary.cs (IDictionary): `IsReadOnly' and `Clear' are
427         inherited from ICollection.
428
429 2004-09-20  Gert Driesen <drieseng@users.sourceforge.net>
430
431         * ReadOnlyCollection.cs: Moved to System assembly
432         * Collection.cs: Moved to System assembly
433
434 2004-09-07  Carlos Alberto Cortez <carlos@unixmexico.org>
435
436         * ReadOnlyCollection.cs: New file and changes to 
437         Collection.cs tu support it.
438
439 2004-09-05  Marek Safar <marek.safar@seznam.cz>
440
441         * Dictionary.cs: Added new file (no implementation).
442
443 2004-09-03  Carlos Alberto Cortez <carlos@unixmexico.org>
444
445         * Collection.cs: Small improvements related to
446         style, resizing, and type checking.
447
448 2004-09-01  Carlos Alberto Cortez <carlos@unixmexico.org>
449
450         * Collection.cs: New file.
451
452 2004-08-04  Martin Baulig  <martin@ximian.com>
453
454         * List.cs (List<T>.Enumerator): Made this a struct.
455         (List<T>.GetEnumerator): The public method now returns the
456         `Enumerator' struct.
457
458 2004-08-02  Martin Baulig  <martin@ximian.com>
459
460         Started to do some API review.
461
462         * ICollection.cs (ICollection<T>): Added IsReadOnly, Add, Clear,
463         Contains and Remove.
464
465         * IList.cs (IList<T>): Removed Add, Clear, Constains, Remove,
466         IsReadOnly and IsFixedSize.
467
468 2004-08-02  Martin Baulig  <martin@ximian.com>
469
470         * IList.cs (IList.Add): Changed return type to void.
471
472         * List.cs (List.Add): Likewise.
473
474 2004-07-16  Martin Baulig  <martin@ximian.com>
475
476         * IComparable.cs: Removed, it's in System.
477
478 2004-07-12  Duncan Mak  <duncan@ximian.com>
479
480         * KeyNotFoundException.cs: Added.
481
482 2004-06-18  Ben Maurer  <bmaurer@ximian.com>
483
484         * Comparer.cs: v2 impl. Some workarounds for gmcs are enabled.
485
486 2004-05-26  Sebastien Pouliot  <sebastien@ximian.com>
487
488         * Queue.cs: Fixed possible integer overflow in CopyTo methods.
489         * Stack.cs: Fixed possible integer overflow in CopyTo methods.
490
491 2004-03-13  Martin Baulig  <martin@ximian.com>
492
493         * Stack.cs, Queue.cs, List.cs: Implement the non-generic interfaces.
494
495 2004-03-11  Martin Baulig  <martin@ximian.com>
496
497         * List.cs: New file.
498
499 2004-03-11  Martin Baulig  <martin@ximian.com>
500
501         * Stack.cs, Queue.cs: Just use `Node' for the nested class, not
502         `Node<T>' (which would create another type parameter `T'
503         overriding `T' from the outer class).   
504
505 2004-02-23  Martin Baulig  <martin@ximian.com>
506
507         * Stack.cs, Queue.cs: New files.  Hmm, looks like I forgot to add
508         them to CVS; they're already on my hard disk since December or so.
509
510 2003-12-08  Martin Baulig  <martin@ximian.com>
511
512         * *.cs: require GENERICS.
513
514 2003-11-08 Ben Maurer  <bmaurer@users.sourceforge.net>
515
516         * *.cs: require NET_2_0 and GENERICS
517
518 2003-11-07 Ben Maurer  <bmaurer@users.sourceforge.net>
519
520         * IComparable.cs, IComparer.cs, IDictionary.cs, IKeyComparer.cs, KeyValuePair.cs
521         Added.
522
523 2003-11-06  Martin Baulig  <martin@ximian.com>
524
525         * ICollection.cs, IList.cs, IEnumerator.cs, IEnumerable.cs:
526         Started to implement the System.Collections.Generic classes.
527