summaryrefslogtreecommitdiff
path: root/src/mscorlib
AgeCommit message (Collapse)AuthorFilesLines
2017-07-21Moving 'System.Single' and 'System.Double' to the ↵Tanner Gooding4-3/+3
'System.Private.CoreLib.Shared' project. (#12967)
2017-07-20Fix resources lookup to use satellite assembly resouce lookup inside AppX ↵Santiago Fernandez Madero1-2/+7
when the assembly is Private.Corelib (#12954)
2017-07-20Merge pull request #12955 from stephentoub/tryderegisterStephen Toub1-0/+10
Fix corefx break due to missing internal method
2017-07-20Fix IndexOutOfRangeException in PayloadNames property (#12932)Vance Morrison1-3/+3
If you pass an null payload using Write<T>, and in the EventListener then call PayloadNames, it will throw an IndexOutOfRangeException. It should just return null. This fixes this.
2017-07-20Fix corefx break due to missing internal methodStephen Toub1-0/+10
System.Runtime.WindowsRuntime uses CancellationTokenRegistration.TryDeregister instead of Dispose to avoid a potential deadlock due to blocking waiting for an in-progress cancellation to complete. Putting back TryDeregister to unblock corefx until a corresponding public API is exposed for this.
2017-07-19Fix CultureInfo.Parent to avoid throwing and catching (#12916)Tarek Mahmoud Sayed1-15/+31
2017-07-19Merge pull request #12819 from stephentoub/cts_perfStephen Toub3-1062/+507
Improve performance of CancellationToken.Register / CancellationTokenRegistration.Dispose
2017-07-19Merge pull request #12755 from tannergooding/classifyEric Mellino3-32/+111
Floating-Point Classification APIs
2017-07-19Fix errors in MSBuild prperties initialization in ↵Jacek Blaszczynski1-5/+3
System.Private.CoreLib.csproj (#12356) Fixes issue #12355 Project System.Private.CoreLib.csproj imports directly Microsoft.Net.Compilers.props at line# 4 before including dir.props from repo root. $(RepoRoot)/dir.props imports Microsoft.Net.Compilers.props at line# 186. As a result of this sequence of duplicated project imports and lack of safeguards against importing the same .props file twice MSBuild reports that Microsoft.Net.Compilers.props file is included twice with warning that second import will be ignored - in this case not evaluated. This results in initialization of Microsoft.Net.Compilers.props values to defaults because MSBuild evaluates Microsoft.Net.Compilers.props only once before $(RepoRoot)/dir.props are included. Removing import of Microsoft.Net.Compilers.props from System.Private.CoreLib.csproj and moving $(RepoRoot)/dir.props file import to top of System.Private.CoreLib.csproj solves these problems by ensuring expected order of evaluation of Microsoft.Net.Compilers.props file by MSBuild after all project wide values are initialized in $(RepoRoot)/dir.props.
2017-07-19Improve the performance of CancellationToken.Register / ↵Stephen Toub3-1062/+507
CancellationTokenRegistration.Dispose CancellationToken.Register currently allocates an object per call. This PR makes it allocation-free (amortized). The current implementation was optimized for scalability, using a lock-free algorithm to minimize contention when lots of threads are registering with a token concurrently. Each registration allocates an object which is then stored into a lock-free sparse array data structure. But the level of scalability enabled is unnecessary for the vast majority of CancellationToken usage, adds non-trivial complexity to the implementation, and adds costs to the most common usage scenarios, e.g. a single CancellationToken that registered with and the unregistered with repeatedly. The new implementation strikes a (IMO) better balance between performance and scalability, retaining most of the latter while doing much better for the former in the most interesting use cases. CancellationTokenSource now maintains an array of partition objects, each of which is lazily-initialized, contains a lock that protects that partition, and contains a linked list of registration objects. The striped locking helps maintain most of the scalability and also enables node reuse due to not suffering from ABA problems. (All numbers that follow are 64-bit.) The size of CancellationTokenSource itself doesn't change (64 bytes), so allocating a CancellationTokenSource and then never registering with its token remains the same in both speed and space. The size overhead associated with the first registration on a CancellationTokenSource improves. With the old implementation, the first registration would result in 272 bytes allocated, whereas with the new implementation that shrinks to 218. Each additional registration at the same time in the CancellationToken is now larger than in the old implementation, 80 bytes instead of ~56 bytes (it varies in the old implementation due to the details of the lock-free algorithm and when new segments are created), but these new node allocations are reusable. So if you register 100 registrations with the same CancellationToken and don't unregister any of them, you'll incur ~8000 bytes of allocation instead of ~5600, but if you instead register and unregister them 100 times, you'll only incur ~80 bytes of allocation instead of ~5600, with objects reused for the former case but not the latter case. Speed is also significantly improved. A single thread registering and unregistering repeatedly from a token is now ~2x the old implementation in throughput. Similarly with eight threads on eight logical cores all registering/unregistering concurrently. Finally, the size of CancellationTokenRegistration also shrinks. This struct is often contained in other classes that have registered with the token, and so will end up shrinking the size of those allocations as well.
2017-07-19Fix build break - delete unused localJan Kotas1-3/+0
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-07-18Missed one empty case in GetPathRoot (#12883)Jeremy Kuhne2-4/+4
This matches our new behavior with whitespace paths
2017-07-18Encoding code clean up (#12864)Tarek Mahmoud Sayed21-652/+444
* Encoding code clean up This change to clean all the serialization code from the encoding and move the files to the shared folder * delete DecoderNLS * re-add DecoderNls with the right casing * remove bIsMicrosoftBestFitFallback * Misc fixes per review comments
2017-07-18Implementing the floating-point classification APIs for System.Single and ↵Tanner Gooding3-32/+111
System.Double.
2017-07-18Move BitConverter to shared CoreLib partition (#12876)Jan Kotas3-45/+4
2017-07-17Path whitespace changes. (#12862)Nina Chikanov8-33/+39
* Path whitespace changes. Change IsNullOrWhitespace to IsNullOrEmpty to be more consistent with legacy desktop .NET code. Path.GetFullPath no longer trims trailing whitespace. (Windows will still eat trailing spaces) * Fix compilation errors with searchPattern
2017-07-17CoreCLR - Remove preemptive checks for path being too long (#12786)Stephen Daudell3-23/+0
* Removed preemptive checks for path being too long. Instead let the native interop handle it. * Deleted unused constants.
2017-07-16Revert PR: https://github.com/dotnet/coreclr/pull/12830 (#12844)Santiago Fernandez Madero1-1/+1
Reverting this PR to unblock coreclr ingestion in corefx. I will open another PR to bring this change back once the infrastructure changes are merged into buildtools and consumed by corefx. See: https://github.com/dotnet/corefx/pull/22295#issuecomment-315574780 cc: @stephentoub
2017-07-15Fix resources lookup to use satellite assembly resouce lookup inside AppX ↵Santiago Fernandez Madero1-1/+1
when the assembly is Private.Corelib (#12830)
2017-07-14Applied MaxSegmentLength restriction in ConcurrentQueueJeffCyr1-2/+2
2017-07-13Change missed by the CoreLib mirror (#12792)Jan Kotas1-0/+1
2017-07-13[Arm64] Enable Span clear optimization (#12788)Steve MacLean1-1/+1
2017-07-13Merge pull request dotnet/corert#4141 from MichalStrehovsky/fixBuildBreakMichal Strehovský2-2/+4
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-07-12Remove dead LazyInitializer file from #12697 (#12767)James Ko2-258/+3
* Delete LazyInitializer.cs * Update LazyInitializer.cs
2017-07-11Remove ThrowExceptionIfDisposedCancellationTokenSource switchStephen Toub5-41/+1
This is a legacy switch from desktop; we used to throw exceptions in certain cases, now we don't, and for whatever reason it was deemed an app compat issue on desktop, so a switch was added to continue throwing that exception if the switch was set. This was all then inherited into coreclr. But there's no reason anyone would want to opt-in to the behavior on core, and the checks for it are actually measurable in scenarios that stress registering/unregistering cancellation tokens. I'm simply deleting the switch.
2017-07-09Unify LazyInitializers with CoreRT (#12697)Jan Kotas4-3/+291
CoreCLR implementation cached s_activatorFactorySelector delegate, but CoreRT did not cache it - it got commented out during earlier AOT binary size optimization efforts. I have unified it by avoiding s_activatorFactorySelector delegate altogether to keep the best of both.
2017-07-09TypeForward cleanup for Culture=neutral (#12698)Viktor Hofer1-1/+1
2017-07-09Move files to shared CoreLib partition (#12694)Jan Kotas10-101/+32
2017-07-08Remove redundant call to TimeSpan.TotalMilliseconds (#12692)James Ko1-3/+3
2017-07-08Merge pull request dotnet/corert#4110 from jkotas/nmirror-mergeJan Kotas2-3/+22
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-07-08Merge pull request dotnet/corert#4100 from dotnet/nmirrorMichal Strehovský1-1/+1
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-07-07Fix Unix debug assert to not use instance handle (#12687)Jeremy Kuhne1-1/+1
2017-07-07Minor fix added to mirrored changesTarek Mahmoud Sayed1-2/+2
2017-07-07Merge pull request dotnet/corert#4086 from ↵Tarek Mahmoud Sayed2-197/+57
tarekgh/CleanupSerializationInEncoding Clean up serialization from Encoding Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-07-05Fix the merge from the corert changesTarek Mahmoud Sayed5-3781/+1
2017-07-06Merge pull request dotnet/corert#4080 from dotnet/nmirrorTarek Mahmoud Sayed4-0/+3863
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-30Merge pull request dotnet/corert#4046 from dotnet/nmirrorMichal Strehovský2-0/+2
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-30Reducing diffs with CoreRT (#12579)Jan Kotas7-137/+65
* Rename m_firstChar to _firstChar to reduce CoreRT diffs * Reducing diffs with CoreRT * Delete dead code
2017-06-29Merge pull request dotnet/corert#4004 from dotnet/nmirrorMichal Strehovský1-9/+9
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-29Use public ConditionalWeakTable iterator (#12564)Jan Kotas3-136/+28
Port https://github.com/dotnet/corert/pull/4030/commits/a3837f7fc60a1b7db872cfef6463f74fb1ffeafb to CoreCLR
2017-06-29Remove m_ prefixes in BinaryReader.cs (#12561)Jan Kotas1-107/+107
2017-06-29Make ResourceManager netstandard 2.0 API behave correctly (#12536)Tarek Mahmoud Sayed1-9/+7
* Make ResourceManager netstandard 2.0 API behave correctly In netstandard 2.0 we have enabled the APIs like GetObject, GetStream,..etc. these are not functioning correctly in UWP apps because was assuming we always uses PRI files. The changes here is to initialize the managed resources too and let these APIs behave as if we are running inside desktop app. * added #ifdef * Remove the throwing as PRI can handle case insenitive lookup * remove un-needed resources
2017-06-29Delete file moved to shared partitionJan Kotas2-430/+0
2017-06-29Merge pull request dotnet/corert#4004 from dotnet/nmirrorMichal Strehovský2-1/+407
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-28Move ReaderWriterLockSlim to shared partitionKoundinya Veluri3-1/+1
2017-06-28Fix debug assert (#12496)Jeremy Kuhne1-2/+2
2017-06-27Fix rough edges after CLI update (dotnet/corert#3983)Jan Kotas2-420/+419
* Move build-restore.cmd back to build-managed buildpipeline needs to be updated to make this split * Cleanup dir.props/dir.targets * Add back VS clues * Reformat whitespaces to match VS convention Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-27Fix bad range check in TextInfo.IndexOfStringOrdinalIgnoreCase (#12478)Atsushi Kanamori1-1/+1
Breaks: int idx = "\uabcd".IndexOf("", 1, StringComparison.OrdinalIgnoreCase); should return 1, returns -1 instead. (propagated fix from CoreRT)
2017-06-26Merge pull request dotnet/corert#3969 from dotnet/nmirrorJan Kotas1-0/+1
Merge nmirror to master Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
2017-06-23Update Windows parameter name for Normalize/IsNormalized with invalid form ↵Hugh Bellamy1-5/+17
(#12430)