Commit Graph
32 Commits
Author SHA1 Message Date
Jb Evain 825886db36 2007-11-15 Jb Evain <[email protected]>
* LinkedList.cs: ifdef out manually the Serialization part of the
	LinkedList.Enumerator. As it is a struct, the field SerializationInfo
	have to be assigned in the default constructor, and the tuner cannot
	remove that. Fixes #341938 for real.

svn path=/trunk/mcs/; revision=89715
2007-11-15 22:10:14 +00:00
Jb Evain 7de8995e75 revert
svn path=/trunk/mcs/; revision=89714
2007-11-15 22:01:14 +00:00
Jb Evain 7a7a997f4b 2007-11-15 Jb Evain <[email protected]>
* LinkedList.cs: let's not have an access to the SerializationInfo
	field outside of serializations methods (We need a gendarme rule). Fixes #341938.


svn path=/trunk/mcs/; revision=89704
2007-11-15 20:36:46 +00:00
Raja R Harinath 9f6323ba73 * RBTree.cs (get_Item, do_remove): Remove redundant code.
svn path=/trunk/mcs/; revision=87165
2007-10-09 14:19:17 +00:00
Jb Evain fb7a99f5f1 in System.Collections.Generic:
2007-08-20  Jb Evain  <[email protected]>

	* SortedList.cs: don't crash in ListKeys and ListValues
	when CopyTo targets an empty array, and that the
	sorted list is empty. Fixes #82492.

in Tests/System.Collections.Generic:
2007-08-20  Jb Evain  <[email protected]>

	* SortedListTest.cs: Tests for #82492.

svn path=/trunk/mcs/; revision=84419
2007-08-20 01:53:32 +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
Igor Zelmanovich 082f8b2081 2007-05-08 Igor Zelmanovich <[email protected]>
* RBTree.cs: for TARGET_JVM used Thread Local Storage 
	istead Thread-Relative Static Fields 

	* TraceImpl.cs:
	* TraceListener.cs:
	for TARGET_JVM used Thread Local Storage istead 
	Thread-Relative Static Fields 


svn path=/trunk/mcs/; revision=76917
2007-05-08 11:18:26 +00:00
Raja R Harinath ceab758710 * RBTree.cs (Enumerator.Current): Remove nullref.
We need to have a generic IEnumerator test harness to catch these silly mistakes.

svn path=/trunk/mcs/; revision=76562
2007-05-02 11:19:37 +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 27304bacca * RBTree.cs (do_remove): Remove some redundant assignments/checks.
(NodeEnumerator): Simplify.  Keep track of a list of
right-pennants that need to be traversed next, rather than
comparing parent pointers.

The usual nit-picking followup

svn path=/trunk/mcs/; revision=76554
2007-05-02 07:39:08 +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
Raja R Harinath 50805d6a56 * RBTree.cs: Refactor to reduce generics code.
svn path=/trunk/mcs/; revision=76498
2007-04-30 14:40:27 +00:00
Raja R Harinath 4f2c3ef75a * RBTree.cs: New red-black tree implementation for use with SortedDictionary.
I'll integrate it into SortedDictionary tomorrow, if no one else gets to it.

svn path=/trunk/mcs/; revision=76469
2007-04-29 19:15:54 +00:00
Gert Driesen 936bb390fb * QueueTest.cs: Removed usage of deprecated Assertion class. Added
test for TrimExcess. Added tests for binary serialization.
* StackTest.cs: Removed usage of deprecated Assertion class. Added
test for TrimExcess. Added tests for binary serialization.
* Queue.cs: Fixed binary serialization, based on patch provided by
Lionel Cuir. Fixes TrimExcess to use SetCapacity, before it was not
updating _head which could lead to IndexOutOfRangeException.
* Stack.cs: Fixed binary serialization, based on patch provided by
Lionel Cuir. In Pop, clear entry from array to help GC.

svn path=/trunk/mcs/; revision=76069
2007-04-22 16:21:13 +00:00
Alan McGovern 5e2ae92305 Bugfix for incrementing the version incorrectly in queue and stack
svn path=/trunk/mcs/; revision=75020
2007-03-27 14:39:33 +00:00
Konstantin Triger a1be005ce9 remove TARGET_JVM conditional compilation blocks
svn path=/trunk/mcs/; revision=73675
2007-03-04 12:57:53 +00:00
Gert Driesen c5825c88a1 * OrderedDictionary.cs: IsReadOnly, indexers, Keys and Values should
not be virtual.
* SortedList.cs: Count property, indexer and Clear method should not
be virtual. Removed unnecessary explicit interface implementation of
Add (TKey, TValue) and Remove (TKey, TValue).
* Queue.cs: Marked Enumerator as Serializable.
* Stack.cs: Marked Stack <T> and Enumerator as serializable.

svn path=/trunk/mcs/; revision=66168
2006-10-02 18:35:51 +00:00
Andrew Skiba 793cdb4dae TARGET_JVM
svn path=/trunk/mcs/; revision=66042
2006-09-28 14:48:17 +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
Miguel de Icaza a5bd130af9 2006-03-11 Miguel de Icaza <[email protected]>
* Uri.cs: Pragma disable warning 612 (Obsolete methods are being
	used by us internally).

	Ponder: should we instead move our methods to use new versions of
	the Obsoleted ones?

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeNamespaceImportCollection.cs: It turns out that a lot of the
	errors flagged with "!" were just missing explicit interface
	implementations.  

	Implement.

2006-03-11  Miguel de Icaza  <[email protected]>

	* CodeDomConfigurationHandler.cs: Comment out unused methods. 

	* TempFileCollection.cs: Implement explicitly some interface
	methods to get rid of the "!" errors on CorCompare.

2006-03-11  Miguel de Icaza  <[email protected]>

	* Queue.cs: Flag as serializable.

	* LinkedList.cs (OnDeserialization): Fix signature. 

	* SortedList.cs: Implement explicitly a few methods that were
	flagged by corcompare. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* IOrderedDictionary.cs: Flag GetEnumerator as a "new" method to
	avoid warning.

2006-03-11  Miguel de Icaza  <[email protected]>

	* ConfigurationSettings.cs (ChangeConfigurationSettings): Make
	internal to avoid warnings.  This routine is called from
	System.Web with MethodInfo.Invoke.

2006-03-11  Miguel de Icaza  <[email protected]>

	* DeflateStream.cs: Comment out DllImport that was not being
	used. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* y

	* SerialPort.cs: Remove unused variable (writeBuffer). 

	* SerialPortStream.cs (Dispose): override, not new.

2006-03-11  Miguel de Icaza  <[email protected]>

	* WebClient.cs: Only expose the right methods to avoid warnings. 

	* FtpDataStream.cs (Dispose): Fix signature.

	* FtpWebResponse.cs: Comment out keepAlive field (unused, sounds
	like we are missing features here).

	* IPAddress.cs: Move m_HashCode property to the end, and set
	pragmas to disable warnings.

2006-03-11  Miguel de Icaza  <[email protected]>

	* MailAddress.cs: Comment out unused field to remove warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkChange.cs: Use pragmas to eliminate warnings from events
	that we do not trigger yet.

	This is a candidate for using Aaron's NetworkManager code.  But
	would make us depend on d-bus.

	* NetworkInformationException.cs: Use error_code for ErrorCode,
	instead of NativeErrorCode.   Fixes warning. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* AuthenticatedStream.cs: Fixed normative parameter names (yes, we
	need to do this everywhere one day).

	(Close): actually obey the "leaveInnerStreamOpen" setting from the
	constructor. 

2006-03-11  Miguel de Icaza  <[email protected]>

	* NetworkStream.cs (Dispose): Use the right signature depending on
	the profile being built.

2006-03-11  Miguel de Icaza  <[email protected]>

	* X509Chain.cs: Flagged member as internal to avoid unused warning.

	* X500DistinguishedName.cs: Comment out unused names and move
	temporary unused variables inside the comments that were removed 



svn path=/trunk/mcs/; revision=57836
2006-03-11 19:07:56 +00:00
Zoltan Varga af48507239 2005-11-10 Zoltan Varga <[email protected]>
* SortedList.cs Queue.cs Stack.cs: Implement TrimExcess methods.

svn path=/trunk/mcs/; revision=52887
2005-11-10 21:37:15 +00:00
Zoltan Varga 62099c134f 2005-11-10 Zoltan Varga <[email protected]>
* SortedList.cs: Fix build.

svn path=/trunk/mcs/; revision=52843
2005-11-10 14:58:16 +00:00
Zoltan Varga 1de1152ae9 2005-11-10 Zoltan Varga <[email protected]>
* Stack.cs SortedList.cs LinkedList.cs: Update to net 2.0 RTM.

svn path=/trunk/mcs/; revision=52842
2005-11-10 13:05:09 +00:00
Zoltan Varga 443353485b 2005-11-09 Zoltan Varga <[email protected]>
* SortedList.cs: New file.

svn path=/trunk/mcs/; revision=52800
2005-11-09 22:01:04 +00:00
David Waite 43706def15 2005-09-04 David Waite <[email protected]>
* LinkedList.cs, LinkedListNode.cs: added implementation of LinkedList<T>

svn path=/trunk/mcs/; revision=49413
2005-09-04 21:11:22 +00:00
Kamil Skalski 23049a0b56 Remove implementation of ICollection<T> from System.Collections.Generic.Stack<T> and Queue<T>, since it is not longer present in MS.NET 2.0 Beta 2.
svn path=/trunk/mcs/; revision=48144
2005-08-08 19:37:46 +00:00
David Waite 38284fecd9 2005-06-20 David Waite <[email protected]>
* Collection.cs, ReadOnlyCollection.cs: removed as they are no longer in the b2 API

svn path=/trunk/mcs/; revision=46282
2005-06-21 06:53:23 +00:00
Atsushi Eno f12881b652 2005-05-13 Atsushi Enomoto <[email protected]>
* corlib_test.dll.sources,
	  corlib.dll.sources: generic Queue.cs and Stack.cs are now in System.
	* System_test.dll.sources,
	  System.dll.sources: generic Queue.cs and Stack.cs are now in System.

	* Queue.cs, Stack.cs: moved to System.dll

	* QueueTest.cs, StackTest.cs: They are now in System.dll


svn path=/trunk/mcs/; revision=44484
2005-05-13 03:50:32 +00:00
Carlos Alberto Cortez c6d5dd084b 2005-02-35 Carlos Alberto Cortez <[email protected]>
* Collections.cs: Changed the code inside IndexOf, for
	the use of Array.IndexOf<>, to keep clean the code.
	

svn path=/trunk/mcs/; revision=41224
2005-02-25 23:40:16 +00:00
Carlos Alberto Cortez 60c8b731cf 2004-11-17 Carlos Alberto Cortez Guevara <[email protected]>
* Collections.cs: Avoid the call to Array.Clear () in RemoveItem (),
	now we only assign the last element (the deleted one) to its default
	value.
	

svn path=/trunk/mcs/; revision=36240
2004-11-18 03:55:51 +00:00
Gert Driesen 7eeddc0328 * ReadOnlyCollection.cs: Moved over from corlib
* Collection.cs: Moved over from corlib

svn path=/trunk/mcs/; revision=34100
2004-09-20 19:18:58 +00:00