ChangeLog 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501
  1. 2007-03-05 David Mitchell <[email protected]>
  2. * List.cs: Fix InsertRange bug (80930).
  3. 2006-09-15 Gert Driesen <[email protected]>
  4. * List.cs: Fixed binary serialization compatibility with MS.NET.
  5. Increment version whenever _items is modified; this fixes version
  6. checks in Enumerator.
  7. 2006-09-06 Zoltan Varga <[email protected]>
  8. * Dictionary.cs: Speed up get_Item/set_Item/GetPrev () a bit. Increase capacity
  9. specified by the user so 'capacity' elements can really be added without resizing.
  10. 2006-07-12 Zoltan Varga <[email protected]>
  11. * Dictionary.cs: Swap order of parameters to cmp.Equals () to improve
  12. compatibility with MS.NET and strange Equals () implementations.
  13. 2006-05-17 Kazuki Oikawa <[email protected]>
  14. * List.cs : implemented Sort(Comparison <T>).
  15. 2006-05-08 Atsushi Enomoto <[email protected]>
  16. * List.cs : use proper comparer in Contains(), IndexOf() and
  17. LastIndexOf(). Patch by Kazuki Oikawa. Fixed bug #77277.
  18. 2006-03-16 Ankit Jain <[email protected]>
  19. * List.cs (CheckIndex): Check for -ve indices and allow index == size.
  20. (Insert): Use CheckIndex.
  21. 2006-03-12 Zoltan Varga <[email protected]>
  22. * List.cs: Applied patch from <[email protected]>. Fixes #77504.
  23. 2006-02-10 Martin Baulig <[email protected]>
  24. * Comparer.cs
  25. (IComparableOfTComparer): `T' must implement `IComparable<T>' and
  26. not `IComparable'.
  27. Tue Jan 24 18:22:54 CET 2006 Paolo Molaro <[email protected]>
  28. * Dictionary.cs: avoid long reminder operations.
  29. 2006-01-23 Raja R Harinath <[email protected]>
  30. Speed up remove. Use 'dict[k]=v' as a self-tuning hint.
  31. * Dictionary.cs (GetSlot): Move data-structure traversal to ...
  32. (GetPrev): ... this. Returns the slot prior to the place we're
  33. looking for, or null if that place is the head of the chain.
  34. (Remove): Use it.
  35. (this.set): Use it. Implement move-to-front on set.
  36. * Dictionary.cs (ToTKey, ToTValue): New helpers to convert from
  37. type 'object'.
  38. (IDictionary.this, IDictionary.Add): Use them.
  39. (IDictionary.Contains, IDictionary.Remove): If the types don't
  40. match, do nothing.
  41. 2006-01-19 Raja R Harinath <[email protected]>
  42. Fix to pass new nunit tests.
  43. * Dictionary.cs (ShimEnumerator): New class. Implement the
  44. requirement that ((IDictionary) foo).GetEnumerator ().Current has
  45. type DictionaryEntry.
  46. (IDictionary.GetEnumerator): Use ShimEnumerator.
  47. (Enumerator.Current): Now has type KeyValuePair<TKey, TValue>.
  48. (Enumerator.MoveNext): Use VerifyState.
  49. (Enumerator.VerifyState): Move validation of 'current' field to ...
  50. (Enumerator.CurrentSlot): ... this.
  51. (Enumerator.Current, Enumerator.IDictionaryEnumerator.Entry):
  52. Use CurrentSlot.
  53. (CopyTo, ICollection.CopyTo): Use subtle reasoning to replace a
  54. '>=' with a '>'. Don't throw an ArgumentException when
  55. index==array.Length && Count==0.
  56. (KeyCollection.CopyTo, ValueCollection.CopyTo): Likewise, and thus
  57. obviate the need to check (dictionary.Count == 0).
  58. 2005-12-20 Sebastien Pouliot <[email protected]>
  59. * List.cs: Applied Atsushi's patch for Sort (bug 76361) now that the
  60. generic versions of Array.Sort are implemented.
  61. 2005-12-19 Sebastien Pouliot <[email protected]>
  62. * Dictionary.cs: Added [Serializable] attribute to both inner
  63. Enumerator struct in Key and Value inner collection classes.
  64. * EqualityComparer.cs: Added missing IEqualityComparer interface.
  65. * List.cs: Added [Serializable] attribute to both inner Enumerator
  66. struct.
  67. 2005-12-19 Sebastien Pouliot <[email protected]>
  68. * Dictionary.cs: Fixed ICollection.CopyTo to use DictionaryEntry. Fixed
  69. Key and Value CopyTo not to throw exception if the dictionary is empty
  70. (fix bug #77019).
  71. * List.cs: Fix exception reporting to match MS behaviour (2.0 final).
  72. 2005-11-19 Zoltan Varga <[email protected]>
  73. * KeyNotFoundException.cs: Add default message.
  74. 2005-09-18 Miguel de Icaza <[email protected]>
  75. * Dictionary.cs: Change style for internal fields.
  76. If the capacity is zero, set the capacity to our default size as 0
  77. is an allowed parameter in .NET
  78. 2005-08-10 Kamil Skalski <[email protected]>
  79. * KeyValuePair.cs, Dictionary.cs: Change Key and Value to properties to match
  80. .NET 2.0 July CTP. Update its use in Dictionary, since now we
  81. cannot write to them.
  82. 2005-07-10 Kamil Skalski <[email protected]>
  83. * Comparer.cs, EqualityComparer.cs: Use MakeGenericType instead of BindGenericParameters.
  84. 2005-06-27 Raja R Harinath <[email protected]>
  85. Introduce some thread-safety by removing the modify-on-read
  86. move-to-front heuristic.
  87. * Dictionary.cs (_enumeratorGeneration, _enumerators): Remove.
  88. (Count): Add internal property set. Invalidate enumerators when
  89. Count is changed. Change all references of _usedSlots to Count.
  90. (this): Invalidate enumerators when the value of some slot is
  91. changed, even if the layout of the data-structure isn't modified.
  92. (DoHash): Remove null-key check. All codepaths leading to this
  93. function already have the check.
  94. (GetSlot): Remove move-to-front heuristic.
  95. (Remove): Update.
  96. 2005-06-24 Martin Baulig <[email protected]>
  97. * IDictionary.cs: Use the same type parameter names than on MS.
  98. * IDictionary.cs, Dictionary.cs: We don't need the `CLSCompliant'
  99. attribute here.
  100. 2005-06-23 Martin Baulig <[email protected]>
  101. * *.cs: Removed the `[ComVisible(false)]' attributes everywhere.
  102. 2005-06-22 Raja R Harinath <[email protected]>
  103. * Dictionary.cs (_generation, _enumeratorGeneration, _enumerators):
  104. New fields to implement fail-fast semantics. All code that
  105. modifies the table increment _generation.
  106. (GetSlot): Use _hcp to compare keys. Return the slot containing
  107. the key, rather than the index. Avoid move-to-front heuristic
  108. when there's an enumerator coursing through the table.
  109. (this, Add, TryGetValue, ContainsKey, Remove): Update to change.
  110. (Enumerator.Enumerator): Save the generation of the dictionary.
  111. (Enumerator.Dispose): Inform dictionary that the enumerator is no more.
  112. (Enumerator.MoveNext, Enumerator.VerifyState): Fail if the
  113. dictionary has been modified.
  114. 2005-06-20 David waite <[email protected]>
  115. * List.cs : substantial changes and optimizations
  116. (AddCollection, AddEnumerable): new internal specializations of AddRange
  117. (AsReadOnly): returns specific IList<T> to match ms.net 2.0b2 api.
  118. (Clear): reset size to zero on clear
  119. (ConvertAll): catch null converter, use Add to prevent OutOfBounds
  120. exception
  121. (FindAll, FindIndex, FindLast, FindLastIndex, RemoveAll, TrueForAll):
  122. check for null match
  123. (FindLastIndex): correct index parameters based on ms.net 2005b2 behavior
  124. (ForEach): catch null action
  125. (CheckIndex): new internal function similar to CheckRange for functions
  126. which only provide a starting index
  127. (InsertCollection, InsertEnumerable): new internal specializations of
  128. InsertRange
  129. (ReadOnlyList): removed, ReadOnlyCollection in
  130. System.Collections.ObjectModel is used instead now
  131. 2005-06-16 David Waite <[email protected]>
  132. * Dictionary.cs (EnumerationMode): Remove.
  133. (Enumerator): Remove return type flag - legacy return is expected to
  134. always return a DictionaryEntry
  135. (Enumerator): Make constructor internal, it is not public on ms.net
  136. beta 2
  137. (VerifyState): Added method to check state preconditions and throw
  138. appropriate exceptions.
  139. (KeyCollection,ValueCollection): Mark sealed to match ms.net beta 2
  140. (KeyCollection.Enumerator._hostEnumerator): make exact struct type,
  141. rather than boxing and using by interface
  142. (KeyCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
  143. (ValueCollection.Enumerator._hostEnumerator): make exact struct type,
  144. rather than boxing and using by interface
  145. (ValueCollection.Enumerator.Dispose): Call _hostEnumerator.Dispose.
  146. * EqualityComparer.cs (DefaultComparer, IEquatableOfTEqualityComparer):
  147. Mark as serializable.
  148. 2005-06-16 Raja R Harinath <[email protected]>
  149. * Dictionary.cs (GetKeys, GetValues): Remove.
  150. (SetThreshold): New function to calculate the resize threshold.
  151. (CopyTo): Don't use foreach syntax.
  152. (ContainsValue): Likewise. Use default equality comparer of the
  153. value type.
  154. (GetObjectData): Use CopyTo to copy into temporary array. Don't
  155. save redundant _usedSlots and _threshold.
  156. (OnDeserialization): Rewrite.
  157. (ICollection<>.CopyTo): Forward to CopyTo.
  158. (Enumerator._nextIndex): Rename to from _index.
  159. (Enumerator._next, Enumerator.FixNext): Remove.
  160. (Enumerator.Current): Rewrite to avoid need for _next.
  161. (Enumerator.IEnumerator.Reset): Update.
  162. (KeyCollection): Is also IEnumerable<TKey> and IEnumerable.
  163. Update methods to conform to standard.
  164. (KeyCollection.GetEnumerator): Restore. Return the correct type.
  165. (KeyCollection.Enumerator): Rename from KeyEnumerator. Simple
  166. wrapper that forwards to Dictionary<,>.Enumerator.
  167. (ValueCollection): Likewise.
  168. 2005-06-12 David Waite <[email protected]>
  169. * IKeyComparer.cs: removed
  170. * KeyValuePair.cs: add same-style ToString as ms.net Beta2 impl,
  171. make Serializable, use correct field names.
  172. * Dictionary.cs: Miscelaneus clean-ups, added serialization
  173. support, use Hashtable prime functions
  174. 2005-06-12 Ben Maurer <[email protected]>
  175. * Comparer.cs, EqualityComparer.cs: Important performance hack:
  176. make sure that we don't box stuff and do reflection on every
  177. comparison. We use reflection at cctor time rather than on every
  178. request.
  179. 2005-06-09 Raja R Harinath <[email protected]>
  180. Simplify Enumerator.MoveNext to make it "obviously correct", rather
  181. than require subtle reasoning about the state of various variables.
  182. * Dictionary.cs (Enumerator._isValid): Remove. Replace all uses
  183. with "_current == null".
  184. (Enumerator._validNodeVisited): Remove.
  185. (Enumerator._next): New. Holds the the next position.
  186. (Enumerator.FixNest): New helper function that ensures that _next
  187. has the right value.
  188. (Enumerator.MoveNext): Simplify. Now, copies _next to _current
  189. and advances _next if possible.
  190. 2005-06-08 Martin Baulig <[email protected]>
  191. * Dictionary.cs (Dictionary.KeyEnumerator): Removed the public
  192. GetEnumerator() function since it's returning the wrong type.
  193. (Dictionary.ValueEnumerator): Likewise. Fix #75073.
  194. 2005-06-08 Ankit Jain <[email protected]>
  195. * Dictionary.cs (Dictionary<TKey, TValue>.MoveNext): Allow traversal of chain in last slot
  196. of the table. Fixes #75168.
  197. 2005-06-04 Ben Maurer <[email protected]>
  198. * *.cs: 2.0 api fixups
  199. 2005-05-26 Miguel de Icaza <[email protected]>
  200. * Dictionary.cs: Remove the `Hash' name from the Dictionary
  201. internal classes, make them public.
  202. 2005-05-26 Zoltan Varga <[email protected]>
  203. * Dictionary.cs: Fix a warning.
  204. * IDictionary.cs: Add missing TryGetValue method.
  205. 2005-05-19 Geoff Norton <[email protected]>
  206. * List.cs (Insert): Resize the array before the shift if needed
  207. 2005-05-18 Miguel de Icaza <[email protected]>
  208. * List.cs (GetRange): Implement.
  209. Do not do lazy loading of data. Not worth adding an
  210. extra check, and not worth the bugs.
  211. This decision wont be discussed until: a) a full List regression
  212. test suite exists and b) performance benchmarks are created. (b)
  213. depends on (a) or the argument wont even be heard.
  214. 2005-05-13 Atsushi Enomoto <[email protected]>
  215. * Queue.cs, Stack.cs: moved to System.dll
  216. 2005-05-06 Martin Baulig <[email protected]>
  217. * *.cs: Add CLSCompliant(true) where missing.
  218. 2005-05-06 Zoltan Varga <[email protected]>
  219. * *.cs: Remove CLSCompliant(false) attributes.
  220. 2005-05-05 Zoltan Varga <[email protected]>
  221. * List.cs: Applied patch from Mart Roosmaa ([email protected]).
  222. Fix Insert method. Fixes #74824.
  223. 2005-04-29 Martin Baulig <[email protected]>
  224. Reflect latest spec changes.
  225. * IEnumerable.cs (IEnumerable<T>): Implement IEnumerable.
  226. * IEnumerator.cs (IEnumerator<T>): Implement IEnumerator.
  227. 2005-04-29 Raja R Harinath <[email protected]>
  228. Remove FIXME.
  229. * Dictionary.cs (Slot<K,V>): Move to ...
  230. (Dictionary<K,V>.Slot): ... here.
  231. 2005-04-28 Martin Baulig <[email protected]>
  232. * Dictionary.cs, Queue.cs, Stack.cs, List.cs, Comparer.cs: Don't
  233. duplicate type parameters in the nested classes.
  234. 2005-04-20 Zoltan Varga <[email protected]>
  235. * List.cs: Fix ToArray () method. Fixes #74675.
  236. 2005-04-04 Raja R Harinath <[email protected]>
  237. * Dictionary.cs: Update to draft of Feb 27. Add some argument checks.
  238. (GetSlot): Don't throw KeyNotFoundException. Unify all list
  239. traversals in here. Move found key to head of chain, and return
  240. the index of the chain suitable for/containing the key.
  241. (Item, Add, Remove): Simplify, and remove FIXMEs.
  242. (Resize): Reuse linked list nodes from old table.
  243. (Dictionary.CopyTo, HashKeyCollection.CopyTo, HashValueCollection.CopyTo):
  244. Add some argument checks.
  245. 2005-04-02 Ben Maurer <[email protected]>
  246. * Dictionary.cs: Real impl.
  247. 2005-02-21 Martin Baulig <[email protected]>
  248. * IComparer.cs: Reverted the last change here, Equals() and
  249. GetHashCode() have been removed a long time ago.
  250. 2005-02-21 Kazuki Oikawa <[email protected]>
  251. * IComparer.cs, IDictionary.cs: Corrected the wrong declaration.
  252. 2005-02-11 Carlos Alberto Cortez <[email protected]>
  253. * List.cs: Added internal ReadOnlyCollection class,
  254. which is a wrapper for a read only IList<T> version of the List<T>.
  255. Used in AsReadOnly () method.
  256. 2005-02-07 Ben Maurer <[email protected]>
  257. * List.cs (CheckRange): Comparison error. Duh!
  258. (Shift): really deal with neg. delta. Also, adjust the `size'.
  259. Based on a patch from Marc Denty ([email protected]).
  260. Fixes #72258.
  261. 2005-01-29 Ben Maurer <[email protected]>
  262. * Queue.cs: `duh' bugs.
  263. 2004-12-27 Ben Maurer <[email protected]>
  264. * Stack.cs: Stupid bug fixes.
  265. * List.cs: My new (mostly untested ;-) impl of List
  266. <T>. Implements most of the API.
  267. 2004-12-26 Ben Maurer <[email protected]>
  268. * Queue.cs: New, non-linked-list based impl.
  269. 2004-11-29 Ben Maurer <[email protected]>
  270. * Comparer.cs: Update this class.
  271. 2004-11-25 Carlos Alberto Cortez <[email protected]>
  272. * List.cs: Enumerator changed to behave like the MS impl.
  273. 2004-11-25 Ben Maurer <[email protected]>
  274. * Stack.cs: New, list based impl. Waiting for some gmcs fixes.
  275. 2004-11-10 Martin Baulig <[email protected]>
  276. * IDictionary.cs (IDictionary): `IsReadOnly' and `Clear' are
  277. inherited from ICollection.
  278. 2004-09-20 Gert Driesen <[email protected]>
  279. * ReadOnlyCollection.cs: Moved to System assembly
  280. * Collection.cs: Moved to System assembly
  281. 2004-09-07 Carlos Alberto Cortez <[email protected]>
  282. * ReadOnlyCollection.cs: New file and changes to
  283. Collection.cs tu support it.
  284. 2004-09-05 Marek Safar <[email protected]>
  285. * Dictionary.cs: Added new file (no implementation).
  286. 2004-09-03 Carlos Alberto Cortez <[email protected]>
  287. * Collection.cs: Small improvements related to
  288. style, resizing, and type checking.
  289. 2004-09-01 Carlos Alberto Cortez <[email protected]>
  290. * Collection.cs: New file.
  291. 2004-08-04 Martin Baulig <[email protected]>
  292. * List.cs (List<T>.Enumerator): Made this a struct.
  293. (List<T>.GetEnumerator): The public method now returns the
  294. `Enumerator' struct.
  295. 2004-08-02 Martin Baulig <[email protected]>
  296. Started to do some API review.
  297. * ICollection.cs (ICollection<T>): Added IsReadOnly, Add, Clear,
  298. Contains and Remove.
  299. * IList.cs (IList<T>): Removed Add, Clear, Constains, Remove,
  300. IsReadOnly and IsFixedSize.
  301. 2004-08-02 Martin Baulig <[email protected]>
  302. * IList.cs (IList.Add): Changed return type to void.
  303. * List.cs (List.Add): Likewise.
  304. 2004-07-16 Martin Baulig <[email protected]>
  305. * IComparable.cs: Removed, it's in System.
  306. 2004-07-12 Duncan Mak <[email protected]>
  307. * KeyNotFoundException.cs: Added.
  308. 2004-06-18 Ben Maurer <[email protected]>
  309. * Comparer.cs: v2 impl. Some workarounds for gmcs are enabled.
  310. 2004-05-26 Sebastien Pouliot <[email protected]>
  311. * Queue.cs: Fixed possible integer overflow in CopyTo methods.
  312. * Stack.cs: Fixed possible integer overflow in CopyTo methods.
  313. 2004-03-13 Martin Baulig <[email protected]>
  314. * Stack.cs, Queue.cs, List.cs: Implement the non-generic interfaces.
  315. 2004-03-11 Martin Baulig <[email protected]>
  316. * List.cs: New file.
  317. 2004-03-11 Martin Baulig <[email protected]>
  318. * Stack.cs, Queue.cs: Just use `Node' for the nested class, not
  319. `Node<T>' (which would create another type parameter `T'
  320. overriding `T' from the outer class).
  321. 2004-02-23 Martin Baulig <[email protected]>
  322. * Stack.cs, Queue.cs: New files. Hmm, looks like I forgot to add
  323. them to CVS; they're already on my hard disk since December or so.
  324. 2003-12-08 Martin Baulig <[email protected]>
  325. * *.cs: require GENERICS.
  326. 2003-11-08 Ben Maurer <[email protected]>
  327. * *.cs: require NET_2_0 and GENERICS
  328. 2003-11-07 Ben Maurer <[email protected]>
  329. * IComparable.cs, IComparer.cs, IDictionary.cs, IKeyComparer.cs, KeyValuePair.cs
  330. Added.
  331. 2003-11-06 Martin Baulig <[email protected]>
  332. * ICollection.cs, IList.cs, IEnumerator.cs, IEnumerable.cs:
  333. Started to implement the System.Collections.Generic classes.