Commit Graph
188 Commits
Author SHA1 Message Date
Jb Evain 232d3340e1 in System.Collections:
2007-11-06  Jb Evain  <[email protected]>

	* Hashtable.cs: Don't compare user keys against the special removed
	key. Fix #324761.

in Test/System.Collections:
2007-11-06  Jb Evain  <[email protected]>

	* HashtableTest.cs: Add test case for #324761.

svn path=/trunk/mcs/; revision=89004
2007-11-06 16:48:36 +00:00
Sebastien Pouliot abdeb6ae08 2007-11-05 Sebastien Pouliot <[email protected]>
* Queue.cs: Avoid IndexOutOfRangeException after TrimToSize. Patch by
	Benjamin Lutz. Fix #321657.


svn path=/trunk/mcs/; revision=88913
2007-11-05 20:47:05 +00:00
Zoltan Varga 7154fb99ce 2007-10-25 Zoltan Varga <[email protected]>
* Hashtable.cs: Put the hash values into a separate array to help the GC. Fixes
	#336069.

svn path=/trunk/mcs/; revision=88233
2007-10-25 21:25:23 +00:00
Robert Jordan bfb7223002 2007-10-23 Robert Jordan <[email protected]>
* SortedList.cs: Mark List|{Values|Keys} as serializable.
	Fixes #335703.


svn path=/trunk/mcs/; revision=87992
2007-10-23 15:58:17 +00:00
Zoltan Varga bdc93649bc 2007-08-25 Zoltan Varga <[email protected]>
* ArrayList.cs: Fix overflows in BinarySearch and qsort.

svn path=/trunk/mcs/; revision=84826
2007-08-24 21:35:38 +00:00
Atsushi Eno 56c9656fd4 another set of cosmetic 2.0 API fixes.
svn path=/trunk/mcs/; revision=83679
2007-08-08 16:25:59 +00:00
Juraj Skripsky c5e73857e2 2007-07-19 Juraj Skripsky <[email protected]>
* ArrayList.cs (ArrayList.Adapter): If the given list already is an
	ArrayList, just return it directly.


svn path=/trunk/mcs/; revision=82298
2007-07-19 16:18:05 +00:00
Gert Driesen 3ca0829cb5 * CaseInsensitiveHashCodeProvider.cs: Lazy init Default instance and
reconstruct it if CurrentCulture changes.
* CaseInsensitiveHashCodeProviderTest.cs: Reworked test for Default
instance to pass on both Mono and MS. Added separate tests that
verify the specific Mono and MS behavior.

svn path=/trunk/mcs/; revision=81412
2007-07-05 17:39:44 +00:00
Gert Driesen 82a943e21a * CaseInsensitiveHashCodeProvider.cs: In default ctor, do not save
TextInfo if current culture is invariant. Remoted private ctor.
In Default, always construct new instance since the current culture
may change. 
* CaseInsensitiveHashCodeProviderTest.cs: Improved test for
Default property to show the a new intance is constructed. Added test
for DefaultInvariant. Improved serialization tests. Added ctor test
for null CultureInfo. Code formatting.
* CultureInfoTest.cs: Fixed UseUserOverride tests to pass on systems
where invariant culture is default locale.

svn path=/trunk/mcs/; revision=81408
2007-07-05 16:40:03 +00:00
Ankit Jain 9c03a6bbf5 * ArrayList.cs (Shift): Clear the unused part of the array when
removing elements.

svn path=/trunk/mcs/; revision=78939
2007-06-08 11:30:38 +00:00
Marek Safar abf21fd382 2006-12-29 Marek Safar <[email protected]>
* BitArray.cs: Performance improvements.

svn path=/trunk/mcs/; revision=70200
2006-12-29 09:51:15 +00:00
Miguel de Icaza 1ded59163d Improved the MonoTODO messages, as these will be developer visible
2006-11-16  Miguel de Icaza  <[email protected]>

	* Hashtable.cs: Serialize EqualityComparer.


svn path=/trunk/mcs/; revision=67996
2006-11-16 13:33:32 +00:00
Miguel de Icaza 2da7bc41d2 2006-08-16 Miguel de Icaza <[email protected]>
* Hashtable.cs (PutImpl): Do not access the table twice, only
	once. 
	
	(TestPrime): optimize, take the sqrt out of the loop.

svn path=/trunk/mcs/; revision=64217
2006-08-22 23:51:19 +00:00
Duncan Mak 0f76af7a36 2006-08-08 Duncan Mak <[email protected]>
* ReadOnlyCollectionBase.cs (Count): Mark as virtual in
	NET_2_0. Fixes #79033.

	* ReadOnlyCollectionBaseTest.cs (TestZeroCountOnNew): Add test for
	overriding Count in NET_2_0 for #79033.

svn path=/trunk/mcs/; revision=63516
2006-08-09 04:37:51 +00:00
Atsushi Eno 35e269abc1 2006-04-26 Atsushi Enomoto <[email protected]>
* Comparer.cs : changed internal field from CultureInfo to
	  CompareInfo. This cosmetic change should fix bug #77701.


svn path=/trunk/mcs/; revision=59912
2006-04-26 08:10:14 +00:00
Marek Safar 1eba37b42f 2006-03-28 Marek Safar <[email protected]>
* Stack.cs: Changed ctor to allocate only requested memory.

svn path=/trunk/mcs/; revision=58660
2006-03-28 17:23:16 +00:00
Paolo Molaro d4d091c6e5 Tue Feb 28 14:16:25 CET 2006 Paolo Molaro <[email protected]>
* BitArray.cs: reintroduce optimization carelessly removed by
	Robitaille.


svn path=/trunk/mcs/; revision=57389
2006-02-28 13:22:44 +00:00
Lluis Sanchez 098c0cc437 2006-02-03 Sebastien Robitaille <[email protected]>
* BitArray.cs: Renamed members for interoperability with MS. 


svn path=/trunk/mcs/; revision=56946
2006-02-16 15:52:25 +00:00
Paolo Molaro a90e543b48 Tue Jan 24 18:24:00 CET 2006 Paolo Molaro <[email protected]>
* BitArray.cs: optimize bit access by removing expensive
	div/rem ops.


svn path=/trunk/mcs/; revision=55993
2006-01-24 17:24:54 +00:00
Sebastien Pouliot 28c6cae779 2006-01-04 Sebastien Pouliot <[email protected]>
* Hashtable.cs: Mark all inner classes as [Serializable] to match MS
	behaviour. Fix bug #76300.


svn path=/trunk/mcs/; revision=55081
2006-01-04 21:26:50 +00:00
Sebastien Pouliot 370b0e520c 2005-12-19 Sebastien Pouliot <[email protected]>
* ArrayList.cs: Fix default capacity under 2.0 (and unit tests under 
	MS 2.0).


svn path=/trunk/mcs/; revision=54605
2005-12-19 15:55:19 +00:00
Sebastien Pouliot e9138c550c 2005-12-07 Sebastien Pouliot <[email protected]>
* SortedList.cs: Removed check for IComparable in ctor (fixed bug 
	#76750). Removed unused private method. Added more useful info (the 
	duplicate key) to an exception.


svn path=/trunk/mcs/; revision=54065
2005-12-07 21:19:54 +00:00
Sebastien Pouliot 616cd22919 2005-12-06 Sebastien Pouliot <[email protected]>
* CaseInsensitiveHashCodeProvider: Serialization is now compatible 
	with MS. Removes the last TODO for 1.1 in this namespace :-)


svn path=/trunk/mcs/; revision=54016
2005-12-07 01:58:49 +00:00
Sebastien Pouliot d3337bbc59 2005-12-05 Sebastien Pouliot <[email protected]>
* Comparer.cs: Added GetObjectData method to implement ISerializable.


svn path=/trunk/mcs/; revision=53939
2005-12-05 18:44:17 +00:00
Miguel de Icaza 5370ce3394 2005-09-29 Miguel de Icaza <[email protected]>
* Add ComVisible(true) to all the classes that needed it.

	* Removed documentation from DictionaryBase.cs and moved it to
	Monodoc. 

	* ArrayList.cs: Fixed signature for constructor, parameter names
	are normative.

	* CollectionBase.cs: Add a couple of missing methods. 



svn path=/trunk/mcs/; revision=51018
2005-09-30 02:15:04 +00:00
Atsushi Eno 87d77899f2 2005-09-01 Atsushi Enomoto <[email protected]>
* Hashtable.cs : SyncHashtable.GetEnumerator() returned keys instead
	  of entries (DictionaryEntry). Fixed bug #75790.

	* HashtableTest.cs : testcase for #75790.


svn path=/trunk/mcs/; revision=49248
2005-09-01 06:24:42 +00:00
Atsushi Eno c531fe7453 2005-09-01 Atsushi Enomoto <[email protected]>
* SortedList.cs : Even though the key/value pair being set are
	  identical to the existing one, it causes snapshot out of sync.
	  Fixed bug #59694.

	* SortedListTest.cs : testcase for #59694.


svn path=/trunk/mcs/; revision=49241
2005-09-01 02:55:35 +00:00
Lluis Sanchez 92903c35ac 2005-07-21 Lluis Sanchez Gual <[email protected]>
* CollectionBase.cs: Lazily create the inner list. MS.NET does
	it and we need to do the same for the sake of serialization
	interoperability. Fixes bug #75575. 

svn path=/trunk/mcs/; revision=47520
2005-07-21 15:13:48 +00:00
Florian Gross 158edf419d Fix for #75545
svn path=/trunk/mcs/; revision=47363
2005-07-17 13:33:51 +00:00
Ben Maurer 851d9deb35 In System.Collections:
2005-06-23  Ben Maurer  <[email protected]>

	* Queue.cs: Use the enumerator rather than copy to in the
	ctor. This makes us more compat with msft, for example, when
	passing a bit array

	* Stack.cs: ditto

In Test/System.Collections:
2005-06-23  Ben Maurer  <[email protected]>

	* QueueTest.cs, StackTest.cs: Test for #75369.


svn path=/trunk/mcs/; revision=46461
2005-06-23 23:09:04 +00:00
Gonzalo Paniagua Javier 064ebdf766 revert
svn path=/trunk/mcs/; revision=46459
2005-06-23 22:47:15 +00:00
Gonzalo Paniagua Javier 1debd10601 2005-06-23 Gonzalo Paniagua Javier <[email protected]>
* BitArray.cs: (CopyTo) support object [] as target. Fixes bug #75369.


svn path=/trunk/mcs/; revision=46458
2005-06-23 22:43:03 +00:00
Martin Baulig 5f29516f91 Removed System.Collections.IKeyComparer.
svn path=/trunk/mcs/; revision=46436
2005-06-23 16:49:31 +00:00
Martin Baulig 00d6ed169c Applied a patch from David Waite <[email protected]> containing some collection updates.
svn path=/trunk/mcs/; revision=46043
2005-06-15 14:10:38 +00:00
Zoltan Varga 3470ce092a 2005-06-06 Zoltan Varga <[email protected]>
* Hashtable.cs: Add some missing 2.0 attributes.

svn path=/trunk/mcs/; revision=45488
2005-06-06 14:13:37 +00:00
Ben Maurer fcca72861f 2005-05-26 Ben Maurer <[email protected]>
* Queue.cs (grow): fix 61919.


svn path=/trunk/mcs/; revision=45066
2005-05-26 17:56:24 +00:00
Atsushi Eno 7bb2d5b190 2005-05-09 Atsushi Enomoto <[email protected]>
* Stack.cs : empty_stack.CopyTo(empty_array, 0) should be allowed.

	* StackTest.cs : test for CopyTo() on an empty stack.


svn path=/trunk/mcs/; revision=44253
2005-05-09 09:21:17 +00:00
Zoltan Varga 2faa9773a9 2005-02-21 Zoltan Varga <[email protected]>
* Hashtable.cs: Add net 2.0 ReliabilityContractAttributes.

svn path=/trunk/mcs/; revision=41005
2005-02-21 16:11:57 +00:00
Kazuki Oikawa 461a081ffb 2005-02-19 Kazuki Oikawa <[email protected]>
* SortedList.cs, Stack.cs: Reverse the order in the Equals calls.

svn path=/trunk/mcs/; revision=40905
2005-02-19 11:42:05 +00:00
Ben Maurer 7284445dc3 * Hashtable.cs (get_Item): duplicate Find here, as we can
specialize a few things. This gives me 7% back.
	(Find) Use break rather than return -1. Saves a bit of code.
	

svn path=/trunk/mcs/; revision=38045
2004-12-21 19:10:43 +00:00
Ben Maurer 1e30148bfb 2004-12-21 Ben Maurer <[email protected]>
* Hashtable.cs (GetHash): Avoid a method call. Also, don't store
	the this.hcpRef in a variable. This will create another register
	which must be pushed on the stack. It is better to just reference
	the variable again. hcpRef.GetHashCode (key) is the slow path
	anyways, so an extra variable reference here doesn't hurt
	(KeyEquals): ditto.

	This gives me a few % back in a raw benchmark.


svn path=/trunk/mcs/; revision=38044
2004-12-21 18:54:07 +00:00
Ben Maurer b0f2cd6acb * Hashtable.cs (Find): Some minor optimizations here.
svn path=/trunk/mcs/; revision=38016
2004-12-21 03:07:59 +00:00
Ben Maurer d12836d6ae * Hashtable.cs: Remove GetImpl and inline it.
svn path=/trunk/mcs/; revision=38009
2004-12-21 00:22:57 +00:00
Ben Maurer 72d62fcf17 * Hashtable.cs (Find): Before calling KeyEquals, check to see if k
== key (ie, they are the same pointer). In many cases, this will
	avoid two virtual calls. This gives me 1% on mcs bootstrap (!!!!)
	

svn path=/trunk/mcs/; revision=38001
2004-12-20 23:01:29 +00:00
Ben Maurer 1fb732c551 2004-12-20 Ben Maurer <[email protected]>
* Hashtable.cs (Find): Make `i' a uint rather than an int. This
	avoids having a long compare.


svn path=/trunk/mcs/; revision=38000
2004-12-20 22:44:29 +00:00
Lluis Sanchez 51b4a2164f 2004-12-16 Lluis Sanchez Gual <[email protected]>
* Hashtable.cs: Check for null serialization info in OnDeserialization.
	A hashtable subclass can fully override the constructor, so
	serializationInfo would be null in this case. Fixes bug #70698.


svn path=/trunk/mcs/; revision=37988
2004-12-20 18:23:22 +00:00
Gonzalo Paniagua Javier e904ac4e91 2004-12-16 Gonzalo Paniagua Javier <[email protected]>
* ArrayList.cs: don't initialize _items twice. Closes bug #70620.


svn path=/trunk/mcs/; revision=37855
2004-12-17 00:54:34 +00:00
Lluis Sanchez a0390e9fd6 2004-12-16 Lluis Sanchez Gual <[email protected]>
* Hashtable.cs: Add deserialized elements in OnDeserialization, since
	when the serialization constructor is called, some of the elements
	may not yet be fully deserialized. This fixes bug #70570.


svn path=/trunk/mcs/; revision=37830
2004-12-16 13:05:43 +00:00
Raja R Harinath e4bbd420a7 (GetHashCode): When culture
is not invariant, avoid an icall on every character.

(This chopped off 15s on a testcase that 'mbas' originally took 1m35s.)

svn path=/trunk/mcs/; revision=34798
2004-10-08 08:38:21 +00:00
Geoff Norton b287d431b5 Patch for bug #61802 (Approved by miguel)
svn path=/trunk/mcs/; revision=31389
2004-07-22 19:30:21 +00:00