summaryrefslogtreecommitdiff
path: root/src/mscorlib
AgeCommit message (Collapse)AuthorFilesLines
2017-06-21Add String.Contains overload with StringComparison (#12400)Yuri Vanin1-0/+6
Staging change of System.Private.CoreLib for CoreFX #20846
2017-06-21Need to pass handle to SeekCore (#12399)Jeremy Kuhne3-33/+38
We're not setting the member field until the end of construction.
2017-06-21Fix event, semaphore, mutex create/open to request the maximum allowe… ↵Koundinya Veluri4-82/+45
(#12381) Fix event, semaphore, mutex create/open to request the maximum allowed access Functional fix for #11306 - Ported dotnet/corert@78fae17f5434839a8720603973ff53f27e27f916 to CoreCLR, see that commit for details on the hang during mutex creation that is also fixed by this change. - Replaced all uses of the *_ALL_ACCESS flags relevant to events, semaphores, and mutexes
2017-06-20Stub Environment from registry apis inside app-containers. (CoreCLR) (#12390)Atsushi Kanamori1-12/+24
We're not going to get exemptions for these inside appcontainers so we'll change them to behave as they do on Unix (present an empty reg key that eats writes requests.)
2017-06-20Merge pull request #11629 from pentp/Math-perfEric Mellino2-46/+7
Optimized Math.Sign
2017-06-19Don't close passed in FileStream handles in constructor (#12253)Jeremy Kuhne3-48/+99
* Don't close passed in FileStream handles in constructor As the finalizer will run when throwing we need to be careful to make sure we don't put the passed-in handle in the member field until we're sure we've succeeeded. Additionally we need to make sure any wrapping SafeHandle we create on a passed in IntPtr isn't collected. * Move platform specific assertion and add comment. * Comment- fix mistake in CanSeekCore
2017-06-19Fixing CompareInfo AssemblyMode.Full serialization between Core <--> Desktop ↵Viktor Hofer1-2/+16
(#12365) * Fixing CompareInfo AssemblyMode.Full serialization * Adding reason why culture field is introduced
2017-06-18Cleanup most code in StringBuilder (#10156)James Ko2-626/+548
* Cleanup most code in StringBuilder * Respond to PR feedback * Document StringBuilder's fields * VerifyClassInvariant -> AssertInvariants * Fix always-true assert * Respond to PR feedback from @stephentoub
2017-06-17Further improve perf of Char.IsWhiteSpace (#12353)Stephen Toub1-1/+5
IsWhiteSpaceLatin1 is not being inlined. By changing a range check done with two comparison operations to instead be done with a subtraction and a single comparison, the code is shortened to not only be less expensive but also then get inlined into IsWhiteSpace and then further into String.IsNullOrWhiteSpace. The net result is a measurable throughput improvement for IsNullOrWhiteSpace.
2017-06-17Merge pull request dotnet/corert#3911 from jkotas/nmirror-mergeJan Kotas1-2/+1
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-17Remove some dead argument checks for unsigned primitives for less than zero ↵Hugh Bellamy1-8/+0
(#12349) * Remove dead comparisons of unsigned primitive less than zero * Delete bad assertition that is consistently hit using the Debug coreclr using the tests
2017-06-17Throw ArgumentNullException on Unix calling Marshal.IsComObject(null) (#12348)Hugh Bellamy1-1/+6
2017-06-16LoadFromResolve event handler should return null incase of any load error ↵Gaurav Khanna1-1/+13
(#12329)
2017-06-16Fix CompareInfo.Version on Windows (#12330)Tarek Mahmoud Sayed1-0/+1
We call Windows to get the sort version. We call Windows passing the structure NlsVersionInfoEx but Windows expect we have to initialize the size of this structure which we are missing.
2017-06-16Add path to exception messages (#12322)Dan Moseley9-99/+37
* Remove dead code * Arg_PathIllegal * IO_PathTooLong * Remove no longer necessary path sanitization * Argument_PathFormatNotSupported * Arg_PathIllegalUNC * Arg_InvalidSearchPattern * Dead strings * Missing nameof
2017-06-15Merge pull request #12307 from stephentoub/iswhitespaceStephen Toub1-5/+1
Small cleanup to Char.IsWhiteSpaceLatin1
2017-06-15Merge pull request #12297 from stephentoub/getdatepartStephen Toub6-80/+63
Avoid duplicated computations with DateTime.GetDatePart
2017-06-15Small cleanup to Char.IsWhiteSpaceLatin1Stephen Toub1-5/+1
For some reason this is resulting in measurably better throughput, in particular for non-whitespace chars, so much so that it's visible in microbenchmarks against string.IsNullOrWhiteSpace. If nothing else, it's cleaner.
2017-06-15Merge pull request dotnet/corert#3890 from jkotas/nmirror-mergeJan Kotas1-15/+3
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-15Avoid duplicated compuations with DateTime.GetDatePartStephen Toub6-80/+63
- Remove duplicate code in GregorianCalendar. GetDatePart is identical to the implementation in DateTime. Just reuse it via the Year/Month/Day properties. Also avoids an unnecessary virtual call. - Then copy GetDatePart into a version that returns year/month/day rather than just one of them. - And use that in several places throughout corelib where all three are retrieved, avoiding redoing all of the calculations three times.
2017-06-14Fix NullReferenceException thrown when using CurrentCulture (#12281)Tarek Mahmoud Sayed1-1/+1
CurrentCulture used the static field s_userDefaultCulture which used to store the current culture. We always ensure this field is initialized all the time. When we introduced the v2.0 added APIs, we have added ClearCachedData(). This method was setting s_userDefaultCulture to null which can cause any other thread to throw this NullReferenceException if it is using s_userDefaultCulture. Here is example of such stack System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace : at System.Globalization.NumberFormatInfo.get_CurrentInfo() at System.Double.ToString(String format, IFormatProvider provider)
2017-06-14Renaming serializable field (#12273)Viktor Hofer1-5/+5
2017-06-14Fix gethashcode for ordinal comparer (#12267)Viktor Hofer1-1/+1
Fix GetHashCode for ordinal comparer
2017-06-13Rewrite of OpCodeGen.pl script to generate correctly IL OpCodes (#12040)Jacek Blaszczynski6-41/+44
* Rewrite of OpCodeGen.pl script to generate correctly IL OpCodes related C# code: FlowControl.cs, OpCodes.cs, OpCodeTypes.cs, OperandType.cs, StackBehaviour.cs from opcode.def file * Update OpcodeType.cs to OpCodeType.cs in System.Private.CorLib.csproj
2017-06-13Remove serializable attribute from OrdinalIgnoreCaseComparer (#12215)Viktor Hofer1-12/+107
* Remove serializable attribute from OrdinalIgnoreCaseComparer * Introducing OrdinalCaseSensitiveComparer to serialize correctly with netfx * Updated PR feedback
2017-06-13Removed the unused vararg version of String ConcatBrian Sullivan1-31/+0
The __arglist version of varargs is not supported on CoreCLR Fixes issue #12146 - crossgen warning - Vararg calling convention not supported. Added a new test case for String Concat Added <DebugType>None Fixed src\JIT\Directed\Misc\gettype csproj as well
2017-06-13Make ActivityID guids process specific. (#11726)Vance Morrison1-1/+2
This is a port a change from the Nuget version of this library. Bascially it hashs in the process ID into the activity ID GUID. This make collisions across processes unlikely.
2017-06-09Revert ResourceManager change to unblock uap tests (#12179)Santiago Fernandez Madero1-1/+1
2017-06-09DateTime serialization fixed, added attention labels to serialized fields ↵Viktor Hofer28-177/+172
(#12181) * DateTime serialization fixed, added attention labels to serialized fields * CultureAwareComparer serialization fix * Order or property fixed
2017-06-08Merge pull request dotnet/corert#3832 from dotnet/nmirrorJan Kotas1-10/+0
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-06Restore logic for when to use satellite resource lookup under AppX (#12117)Jan Kotas3-58/+2
Remove unused cache of Assembly flags while I was on it
2017-06-06TypeForwardedFrom attributes on coretypes for NetFX serialization (#12059)Viktor Hofer50-86/+83
* TypeForwardedFrom attributes on coretypes for NetFX serialization * ValueTuple added * Removed StubEnvironment typeforwards * Modified FQAN for some special type forwards * Support desktop to core serialization with InternalsVisibleTo for mscorlib * Remove typeforwards from nested types * Removed unused file
2017-06-05Merge pull request dotnet/corert#3793 from dotnet/nmirrorJan Kotas2-3/+14
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-03Additional fix for ETW failure in 32 process on 64 bit machines. (#12022)Vance Morrison1-1/+1
* Addtional fix for ETW failure in 32 process on 64 bit machines. The commit associated with Pull Request Fix failures in ETW logging on 4GB aware 32 bit processes #11941 Was incorrect. Some long were changed to ulong, but the critical casting an IntPtr to ulong still does sign extention and not zero extension. Need to cast to a void* first. This fixes this.
2017-06-02fix procCount assertion (#12065)Xiangyang (Mark) Guo1-2/+2
2017-06-02Tiny typo in TaskCompletionSource xml comment (#12066)Bar Arnon1-1/+1
2017-06-02Merge pull request dotnet/corert#3745 from dotnet/nmirrorJan Kotas4-0/+30
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-01Fixes deserializaing TimeZoneInfo by putting back the ↵Morgan Brown1-1/+18
IDeserializationCallback.OnDeserialization method. (#12024)
2017-05-31Post-Serialization cleanup fixes to Reflection (#12010)Atsushi Kanamori11-90/+50
This is based on the following principles: - We should not be making changes to instance/virtual methods in the abstract base types for Reflection. These are apis in themselves to third party classes that subclass these types. Even if the Runtime chooses not to make its own implementations of these type serializable, third party classes have the right to make that choice for themselves and build off the base class serialization infrastructure that was shipped before. RuntimeAssembly and RuntimeModule still override with PNSE so we'll get the desired exception for those cases. - The Runtime's own implementations of these types will not be serializable. Removing all [Serializable] attributes and serialization interfaces. Runtime types are internal types and thus have no duty to implement ISerializable if the public abstract base type does not.
2017-05-31Expose Enumerator members out of EnvironmentAugments. (#11980)Atsushi Kanamori2-69/+64
Expose Enumerator members out of EnvironmentAugments.
2017-05-31Internal hashtable serialization attribute removedViktor Hofer1-1/+0
2017-05-30Coretype variables renamed back to netfx counterpart for reflection based ↵Viktor Hofer19-336/+364
serialization (#11910) * Variables renamed for reflection based serialization * Make EqualityComparers serialize like desktop * add missing interfaces * TimeZone serializable added * Internal hashtable serializable * Removed TimeZone as serializable type * Remove Lazy<T>'s [Serializable] attribute for 2.0 For performance, Lazy was completely rewritten for .NET Core 2.0 and has an entirely different format than desktop; trying to get it to match the desktop serialization format would require either reverting or providing a complicated custom serialization/deserialization implementation to try to match. Lazy can also wrap an Exception that occurred from trying to instantiate the object, and the only exception types that are serializable as of now in core are the base Exception and AggregateException. As such, we're cutting it from the list of supported types in 2.0. An easy workaround is simply to do what the implementation does: serialize lazy.Value instead of lazy. * tiny fixes to equalitycomparer.cs
2017-05-31Optimized Math.SignPent Ploompuu2-46/+7
2017-05-30Fix build breakJan Kotas1-0/+2
2017-05-30Moves windows specific field to Debug.Windows.cs file (dotnet/corert#3733)Marek Safar1-2/+0
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-05-30Fix failures in ETW logging on 4GB aware 32 bit processes (#11941)Vance Morrison3-6/+6
We incorrectly cast a 32 bit pointer to a 64 bit poitner using as a SIGNED integer. If this is a 32 bit process that is using more than 2GB of memory this can result in sign rather than zero extension. This makes the poitner invalid at the OS level and causes the OS API to fail. We disovered this in Visual Studio when debugging large (Rosyln) scenarios. There were numerous failures which causes sever slowdowns becasue the EventSource logged OutputDebugString events when the OS API failed. The fix is to use unsigned extension. Note that I have confirmed that casting from a IntPtr or a void* to a ulong does zero extension (that is it uses the target type to determine whether to use sign or zero extension). To be useful for Visual Studio, this needs to be ported to the desktop runtime.
2017-05-28Fix build breaksMorgan Brown2-15/+3
* Remove UnitySerializationHolder references * Remove the fields of StrongNameKeyPair * Initialize BadImageFormatException._fusionLog * Remove MemberInfoSerializationHolder references Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-05-27IDeserializationCallback cleanupMorgan Brown7-160/+12
Throws PlatformNotSupportedException from IDeserializationCallback and IObjectReference implementations on types that are no longer serializable.
2017-05-26ISerializable cleanup (#11873)Morgan Brown129-1529/+221
Changes to throw PlatformNotSupportedException from ISerializable.GetObjectData and serialization constructors on non-Serializable types. Also removes private serialization constructors and some unneeded code that was used to support serializing non-serializable types. A few tests testing GetObjectData implementations are also removed. For Exception types, we call base instead of throwing from GetObjectData to be consistent with the many Exceptions that don't override GetObjectData
2017-05-25Merge pull request dotnet/corert#3709 from dotnet/nmirrorMichal Strehovský4-0/+45
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>