Commit Graph
11 Commits
Author SHA1 Message Date
Marek Safar c964e24d02 [system] More SortedDictionary argument checks 2014-02-05 13:16:40 +01:00
Marek Safar 482e63b5bd Few corcompare fixes 2011-09-05 19:02:32 +01:00
Luke Halliwell c135c68bf6 Fix for bug 349053 - unable to serialize SortedDictionary 2011-01-03 21:43:27 -05:00
Marek Safar 4420b773d7 2009-10-20 Marek Safar <[email protected]>
* SortedList.cs, LinkedList.cs, Queue.cs, Stack.cs,
	SortedDictionary.cs: Improve debugging experience.


svn path=/trunk/mcs/; revision=144438
2009-10-20 10:34:39 +00:00
Raja R Harinath 876b8f2fb6 Fix Enumerator.Current handling in SortedDictionary<,>
* System.Collections.Generic/RBTree.cs (NodeEnumerator.check_current):
 New helper.
(NodeEnumerator.Current): Don't check invariants.
* SortedDictionary.cs (Enumerator.Current): Likewise.
(ValueCollection.Enumerator.Current): Likewise.
(KeyCollection.Enumerator.Current): Likewise.

* Test/System.Collections.Generic/SortedDictionaryTest.cs
(Enumerator_Current, KeyEnumerator_Current, ValueEnumerator_Current): New tests.

svn path=/trunk/mcs/; revision=139115
2009-07-30 19:42:04 +00:00
Miguel de Icaza 0f4e81e0fd Contribution from Pia Eriksson <[email protected]> that fixes
the CopyTo method in various generic containers.

Also fixes #497720


svn path=/trunk/mcs/; revision=133700
2009-05-07 00:42:16 +00:00
Raja R Harinath 58dd5660cb Avoid unnecessary allocation on indexer access
* SortedDictionary.cs (NodeHelper): Rename from NodeComparer.
(NodeHelper.CreateNode): New.
(Item.set): Move responsibility of creating new nodes to RBTree.Intern.
* RBTree.cs (INodeHelper): Rename from INodeComparer.
(INodeHelper.CreateNode): New.
(Intern): Use it to create a new node if no node is passed in.

svn path=/trunk/mcs/; revision=76926
2007-05-08 12:59:50 +00:00
Raja R Harinath 2be5b62889 * SortedDictionary.cs (ICollection.Contains): Use EqualityComparer
for comparing the value field.

svn path=/trunk/mcs/; revision=76556
2007-05-02 09:26:21 +00:00
Raja R Harinath c108605ecf Update copyright notice. Note that this is essentially a complete
rewrite.

svn path=/trunk/mcs/; revision=76538
2007-05-01 19:17:13 +00:00
Raja R Harinath 822e74d15d In .:
* System.dll.sources: Add RBTree.cs.

In System.Collections.Generic:
	Make add and remove operations O(log n).
	* SortedDictionary.cs: Rewrite to use the red-black tree
	implementation from RBTree.cs.
	* RBTree.cs: Some more refactoring.  Rename Insert() to Intern(),
	and modify semantics slightly.  Replace Contains() with Lookup().

In Test/System.Collections.Generic:
	* SortedDictionaryTest.cs (AddNullKeyNullable): Enable.

svn path=/trunk/mcs/; revision=76537
2007-05-01 19:07:31 +00:00
Atsushi Eno 3ff8295d31 2006-04-05 Atsushi Enomoto <[email protected]>
* System.dll.sources : added SortedDictionary.cs.
	* System_test.dll.sources : added SortedDictionaryTest.cs.

	* SortedDictionary.cs : new file. The original code is mostly
	  from Kazuki Oikawa.

	* SortedDictionaryTest.cs : new test.


svn path=/trunk/mcs/; revision=59052
2006-04-05 07:36:29 +00:00