ChangeLog 17 KB

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