Commit Graph
44 Commits
Author SHA1 Message Date
Michal Strehovský 434ec4110d Fix namespace of the AmbiguousImplementationException (#22291)
Moving to the namespace that was approved in dotnet/corefx#34124.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 13:48:02 +01:00
Markus Kitsinger 63e512d133 Add AmbiguousImplementationException (dotnet/coreclr#22280)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 09:33:07 +01:00
Markus Kitsinger 3850bce0f0 Do not cache error string in SerializationException (dotnet/coreclr#22281)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 09:33:07 +01:00
Marek Safar 167e79290f Move Marshal::StringTo* methods to shared partition (dotnet/coreclr#22266)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 09:30:24 +01:00
Tanner Gooding fb1a589aea Fixing several of the HWIntrinsic SoftwareFallback functions to be captureless (#22263)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 09:30:24 +01:00
Michal Strehovský 3d17e982c1 Recover some of the size lost with AsyncMethodBuilder/Task unification (#6913)
When we unified the implementations of these across all of our runtimes, we lost all size optimizations people have been doing on the Project N side over the past six years.

This restores a bit of the loss. For one sample app with lots of async usage, this removes 2.1 MB of generic instantiations.

There is more we can do, but I can't spend time on that right now. These two things jumped out on me when I was looking at it back in December and were an easy fix I wanted to do for a while.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 09:30:24 +01:00
Marek Safar 1f4a0965cc Add Marshal ansi conversion to shared partition (dotnet/coreclr#22243)
* Add Marshal ansi conversion to shared partition

* Ignore bestFit/throwOnUnmappableChar on Unix

* Use same assert in StringToAnsiString

* wideCharLen parameter rename

Signed-off-by: dotnet-bot <[email protected]>
2019-01-29 09:15:21 +01:00
Stephen Toub 6d13120e7c Remove several uses of VoidTaskResult (dotnet/coreclr#22238)
* Remove defunct netstandard code from ValueTask

* Remove several uses of VoidTaskResult

Currently TrySetResult/Canceled/Exception live on `Task<T>`.  There's no reason `TrySetCanceled` and `TrySetException` need to live there, as they only access state from the base `Task`, and so can be moved down.  `TrySetResult` needs the `TResult`, however in a variety of cases `Task<T>` is used with a `VoidTaskResult`, and for such cases we can just have a parameterless `TrySetResult()` on the base class as well, which can be used any time there is no `TResult` or when `default(TResult)` is the desired result.  This lets us switch several cases where we were using `Task<VoidTaskResult>` to just be `Task`, which saves 8 bytes on the task instance on 64-bit.  It also avoids an Interlocked.Exchange as part of the TrySetResult call.

This primarily affects Task.Delay and the non-generic variants of Task.WhenAll, ValueTask.AsTask(), Task.FromCanceled, and Task.FromException.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-27 22:45:35 +01:00
Dotnet-GitSync-Bot f932a50d51 Mirror changes from mono/coreclr (#12635)
* Move Marshal::ZeroFree* to shared partition (dotnet/coreclr#22230)

* Move Marshal::ZeroFree* to shared partition

* Add managed version of SysStringByteLen

Signed-off-by: dotnet-bot <[email protected]>

* Remove duplicated code
2019-01-27 08:47:05 +01:00
Dotnet-GitSync-Bot 87220f95fc Mirror changes from mono/coreclr (#12629)
* Move more Marshal methods to shared partition (dotnet/coreclr#22205)

* Move more Marshal methods to shared partition

* Implement ThrowExceptionForHR in managed

Signed-off-by: dotnet-bot <[email protected]>

* Remove local copy
2019-01-26 09:24:24 +01:00
Dotnet-GitSync-Bot f76994e0a1 Mirror changes from mono/coreclr,corert (#12612) 2019-01-25 14:01:09 +01:00
Marek Safar ea13736f5c Move TaskContinuation to shared partition (dotnet/coreclr#22167)
* Move TaskContinuation to shared partition

* Remove TASK_STATE_THREAD_WAS_ABORTED from Task

* Use already existing ThrowAsync

Signed-off-by: dotnet-bot <[email protected]>
2019-01-25 00:00:06 +01:00
Stephen Toub 677d83b4ab Implement IAsyncDisposable.ConfigureAwait (dotnet/coreclr#22160)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-24 10:56:26 +01:00
Jan Kotas 63d2f0e6ec Fix CoreRT build after moving Task.cs to shared partition
Signed-off-by: dotnet-bot <[email protected]>
2019-01-23 22:16:07 +01:00
Filip Navara ee6597030e Build fixes.
Signed-off-by: dotnet-bot <[email protected]>
2019-01-23 22:06:53 +01:00
Filip Navara dd90410129 Move MemoryFailPoint to shared CoreLib partition (dotnet/coreclr#22104)
* Move MemoryFailPoint to shared CoreLib partition.

* Split MemoryFailPoint into Unix and Windows versions.

* Replace MemoryFailPoint.GetMemorySettings FCall with GC.GetSegmentSize to make sharing with CoreRT easier.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-22 13:40:28 +01:00
Jan Kotas 4833a124da Cleanup array related FCalls (dotnet/coreclr#22097)
* Cleanup Array FCalls

* Disable outdated CoreFX tests

https://github.com/dotnet/corefx/pull/34700

Signed-off-by: dotnet-bot <[email protected]>
2019-01-20 17:37:51 +01:00
Jan Kotas 698e3cb786 Fix CoreCLR build for changes in shared partition
Signed-off-by: dotnet-bot <[email protected]>
2019-01-20 09:24:44 +01:00
Jan Kotas 3505ee705e Fix build for ProjectN/WinRTInterop Delete superfluous AsyncCausalityTracer arguments
Signed-off-by: dotnet-bot <[email protected]>
2019-01-19 20:39:48 +01:00
Marek Safar 091f7c3fc8 Fix build
Signed-off-by: dotnet-bot <[email protected]>
2019-01-19 20:39:48 +01:00
Marek Safar 2963d731c3 Move AsyncCausality to shared partition (dotnet/coreclr#22062)
* Move AsyncCausality to shared partition

* Set FeatureAsyncCausalityTracer property

Signed-off-by: dotnet-bot <[email protected]>
2019-01-18 18:20:29 +00:00
Michal Strehovský 3c0c8adbf8 Enable detection of HW intrinsics (dotnet/corert#6836)
I took the liberty of marking the types containing the hardware intrinsics as [Intrinsic] to avoid doing a name check on everything in the system module. It feels like we should take advantage of this attribute in CoreCLR too.

This doesn't actually enable the support because RyuJIT unconditionally disables HW intrinsics for prejit (both CoreRT and CPAOT are considered prejit). We might want to do something about this on the RyuJIT side to address that (for CPAOT, to be able to pregenerate best code possible ahead of time, assuming a fixed ISA; and for CoreRT without JIT, where the concerns about AVX-SSE penalty don't apply). See conversation in dotnet/coreclr#21603

Signed-off-by: dotnet-bot <[email protected]>
2019-01-18 16:10:00 +01:00
Marek Safar 18ca997ac9 Fix defines in TaskAwaiter (dotnet/corert#6846)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-18 16:10:00 +01:00
Filip Navara 292c674043 Split ContractsBCL into separate classes and move them to shared CoreLib (#22006)
* Split up ContractsBCL into separate classes.

* Move remaining Contract, ContractHelper code to shared partition.

* Split ContractHelper to allow custom debugging experience in CoreRT.

* Simplify ContractHelper.InternalContractFailed.

* Use resource loading code from CoreRT.

* Remove unused parameter.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-18 15:36:44 +01:00
Marek Safar d864752ea0 Fix AsyncMethodBuilder build on Mono (dotnet/coreclr#22034)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-17 17:51:24 +01:00
Filip Navara 90ca7ea980 Fix CoreCLR build of AsyncMethodBuilder.
Signed-off-by: dotnet-bot <[email protected]>
2019-01-17 14:15:13 +01:00
Filip Navara f83d82c76f Move AsyncMethodBuilder to shared. (dotnet/corert#6832)
* Move AsyncMethodBuilder to shared.

* Bring back PROJECTN.

* #if-out TrackAsyncMethodCompletion for CoreRT.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-16 19:53:03 +01:00
Jan Kotas ed6041b7cf String -> string
Signed-off-by: dotnet-bot <[email protected]>
2019-01-16 09:52:55 +01:00
Marek Safar c404a499ad Move more COM exceptions to shared partition (dotnet/corert#6829)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-16 09:46:53 +01:00
Stephen Toub 4ff1c28c3f Add WithCancellation for async enumerables (dotnet/coreclr#21939)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-11 10:13:43 +01:00
Marek Safar 5ba3db2155 Move COMException to shared partition (dotnet/corert#6803)
* Move COMException to shared partition

* Review feedback

Signed-off-by: dotnet-bot <[email protected]>
2019-01-10 22:02:45 +01:00
Jan Kotas 0a8c290c5b More DispatchWrapper tweaks
Signed-off-by: dotnet-bot <[email protected]>
2019-01-09 18:42:49 +01:00
Marek Safar 0f107837c0 Removes PNSE version of DispatchWrapper and keep only single version with ifdef
Signed-off-by: dotnet-bot <[email protected]>
2019-01-09 18:42:49 +01:00
Jan Kotas 4114852a8b Delete files moved to shared partition
Signed-off-by: dotnet-bot <[email protected]>
2019-01-09 18:42:49 +01:00
Marek Safar 7897436a7e Moves common COM type to shared corelib partition (dotnet/corert#6782)
* Moves common COM type to shared corelib partition

* Moves GetHRForException to PInvokeMarshal

* Add temporary CORECLR ifdef to ArrayWithOffset

* Apply cleanup from CoreCLR

Signed-off-by: dotnet-bot <[email protected]>
2019-01-09 10:01:33 +01:00
Jan Kotas de75ac8c6f CoreRT updates for files moved to shared partition
Signed-off-by: dotnet-bot <[email protected]>
2019-01-08 08:40:23 +01:00
Marek Safar 84d992cfd7 Moves ComTypes to shared partition (dotnet/coreclr#21861)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-08 08:35:32 +01:00
Stephen Toub c2a5e933bd Replace Array.Copy(src, dst, int) calls with Array.Copy(src, 0, dst, 0, int) (#21756)
The former calls GetLowerBound(0) on both src and dst, which is unnecessary when the arrays are T[] and thus always have a lower bound of 0.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-02 23:08:47 +01:00
Marek Safar 326afd6eaf Moves ExceptionDispatchInfo to shared location (dotnet/coreclr#21725)
* Moves ExceptionDispatchInfo to shared location

* Use struct for Exception.DispatchState, avoid TLAs in names, misc cleanup

Signed-off-by: dotnet-bot <[email protected]>
2018-12-31 21:07:53 +01:00
Jan Kotas c624667e2f Add license, keep more of the CriticalHandle logic in the shared file
Signed-off-by: dotnet-bot <[email protected]>
2018-12-31 10:44:45 +01:00
Marek Safar c508d6d3c9 Moves CriticalHandle to shared location
Signed-off-by: dotnet-bot <[email protected]>
2018-12-31 10:44:45 +01:00
Jan Kotas 6069e0909a Synchronize Task, Awaiter and ThreadPool implementation with CoreCLR (#6706)
Synchronized the code as much as possible with CoreCLR. The one major piece that I have excluded is tracing. I will look into doing that separately.

Signed-off-by: dotnet-bot <[email protected]>
2018-12-22 11:29:22 +01:00
Fei Peng 44af99b0ab Implement the remaining BMI1/2 intrinsic (dotnet/coreclr#21480)
* Add tests for BMI1/2 intrinsic

* Implement the remaining BMI1/2 intrinsic

* Fix emitDispIns for BMI instruction

Signed-off-by: dotnet-bot <[email protected]>
2018-12-22 11:16:14 +01:00
dotnet bot ccd7b52ca8 Add System.Private.CoreLib shared sources (#12162)
Taken from corefx commit 5956ad35864352b38c53aa8c2d1ce012c96b168d. Subsequent updates will happen via a mirroring bot.
2018-12-20 18:51:17 +01:00