Commit Graph
61 Commits
Author SHA1 Message Date
Marek Safar dbac2e4ffc Move FrameworkEventSource to shared partition (dotnet/coreclr#22507)
* Move FrameworkEventSource to shared partition

and remove unused code

* Remove more unused code

* Remove CA8001 suppress message

Signed-off-by: dotnet-bot <[email protected]>
2019-02-14 22:47:06 +01:00
Stephen Toub 85caf55c16 Move SafeHandle to managed code and shared (dotnet/coreclr#22564)
* Move SafeHandle to managed code and shared

This moves the implementation of SafeHandle from native code in the runtime to managed.  I used corert's implementation as a base, and reviewed it again against the existing native implementation, making a few tweaks to better match the existing semantics.

This should be a valid move because of the reduced goals around CERs, thread aborts, etc.

However, there are places in the runtime that access SafeHandle functionality via its native counterpart, so I kept the relevant pieces of the native code intact.  Most code will continue to use the managed APIs, but the runtime can continue calling into the native versions when needed.

* Address PR feedback

* Address PR feedback

Signed-off-by: dotnet-bot <[email protected]>
2019-02-13 23:24:44 +01:00
Stephen Toub 64a626fa87 Move GCHandle to shared (dotnet/coreclr#22499)
* Move GCHandle to shared

* Cache the handle in a local to make it easier for JIT to generate good code

* Rename m_handle to _handle to match the coding conventions

* Delete isPinned argument for GCHandleInternalCompareExchange

* Add fast path to GCHandle.Alloc/Free FCalls

* Disable outdated test

Signed-off-by: dotnet-bot <[email protected]>
2019-02-12 21:19:29 +01:00
Dotnet-GitSync-Bot 374f44ebe8 Mirror changes from mono/corert,coreclr (#12951)
* Make Module partial to allow additional changed for Mono

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

* Move ConditionalWeakTable to shared (dotnet/coreclr#22531)

Leaves DependentHandle as being the runtime PAL

Signed-off-by: dotnet-bot <[email protected]>
2019-02-12 01:45:39 -05:00
Stephen Toub 9d136f9446 Move Volatile to shared (dotnet/coreclr#22523)
* Move Volatile to shared

This largely takes corert's implementation, which uses Unsafe.As and volatile fields.

We could investigate also removing the JIT's replacements subsequently.

* Add [Intrinsic] attributes

Signed-off-by: dotnet-bot <[email protected]>
2019-02-12 00:32:45 +01:00
Sung Yoon Whang 544c43d0d6 set up CoreLib to include EventCounter in build project (#22501)
Signed-off-by: dotnet-bot <[email protected]>
2019-02-10 09:32:05 +01:00
Marek Safar 903b264c4f Move Array's SZGenericArrayEnumerator to shared partition (#22480)
* Move Array's SZGenericArrayEnumerator to shared partition

* Remove legacy comment

* Move all array enumerators to a new file

Signed-off-by: dotnet-bot <[email protected]>
2019-02-09 08:30:10 +01:00
Stephen Toub 4bb7d23683 Move GCSettings to shared (dotnet/coreclr#22483)
Mainly just type definitions and error handling that gets shared.

Signed-off-by: dotnet-bot <[email protected]>
2019-02-08 23:15:15 +01:00
Marek Safar 9636096e3b Move DateTime for Unix to shared partition (dotnet/coreclr#22383)
* Move DateTime for Unix to shared partition

* Keep CoreCLR specific implementation

Signed-off-by: dotnet-bot <[email protected]>
2019-02-08 10:37:29 +01:00
Stephen Toub a4681c14d9 Fix CoreLib to include PasteArguments.Unix.cs correctly (#22453)
Signed-off-by: dotnet-bot <[email protected]>
2019-02-08 10:27:04 +01:00
Marek Safar 2e267dfa80 Move Array to shared partition (dotnet/coreclr#22321)
Signed-off-by: dotnet-bot <[email protected]>
2019-02-08 10:27:04 +01:00
Marek Safar d2ee660406 Move SynchronizationContext to shared partition (dotnet/coreclr#22389)
* Move SynchronizationContext to shared partition

* Move WaitHelperNative to WaitHandle

Signed-off-by: dotnet-bot <[email protected]>
2019-02-05 10:20:12 +01:00
Filip Navara 7d53edefa2 Remove code that was moved to System.Native (dotnet/corert#6932)
* Remove code that was already moved from System.Private.CoreLib.Native to System.Native.

* Move Interop files for System.Native to shared Interop directory.

* Add FeaturePortableThreadPool conditions to csproj files.

Signed-off-by: dotnet-bot <[email protected]>
2019-02-04 14:18:40 +01:00
Filip Navara 21fca52b3d Move ResourceManager to shared CoreLib. (dotnet/coreclr#22249)
* Move ResourceManager to shared CoreLib.

* Split UAP code out of ResourceManager.cs into separate files.

* Remove ResourceManager.NonUap.cs.

* Do not access internal field (CoreRT build fix).

* Fix non-Windows builds (CoreRT).

* Remove obsolete Debug code.

Signed-off-by: dotnet-bot <[email protected]>
2019-02-02 00:20:35 +01:00
Michal Strehovský 1139b8e47a Fix ProjectN build breaks (dotnet/corert#6924)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-31 19:25:56 +01:00
Stephen Toub 8eeffb8628 Switch CoreLib over to using shared Environment from corefx (#22106)
This requires merging/adapting the implementation with EnvironmentAugments (which goes away completely), the shared files, what corert has, etc.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-30 23:28:37 +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
Filip Navara 0ed3a181c1 Move Timer to shared CoreLib partition. (dotnet/coreclr#22231)
* Move Timer to shared CoreLib partition.

* Move SignalNoCallbacksRunning back to shared code, add static EventWaitHandle.Set.

* Remove AppDomain references from shared Timer code, reshuffle some code out of SetTimer in non-shared code.

* Change m_ prefix to match code style.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-27 22:45:35 +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
Ben Adams c68385b8a6 Speedup SpanHelpers.IndexOf{Any}(byte, ...) (dotnet/coreclr#22118)
* Speedup SpanHelpers.IndexOf(byte)

* 128 * 2 alignment

* Move TrailingZeroCountFallback to common SpanHelpers

So it can be used by other types than byte

* Speedup SpanHelpers.IndexOfAny(byte, ...)

* Indent for support flags

* More helpers, constency in local names/formatting, feedback

* Skip bounds check in software fallback

Signed-off-by: dotnet-bot <[email protected]>
2019-01-24 11:15:35 +01:00
Marek Safar 973b5c1b0f Move IOCompletionCallback to shared partition (dotnet/corert#6875)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-24 11:15:35 +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
Filip Navara 9fe6dcb374 Move common ThreadPool code to shared CoreLib partition. (#22115)
* Move common ThreadPool code to shared CoreLib partition.

* Move numWorkingThreads counting out of shared code.

* Rename ThreadPoolGlobals.vmTpInitialized to threadPoolInitialized.
Remove exception handling from ThreadPoolWorkQueue.Dispatch.
Remove obsolete code from ThreadPoolWorkQueue.Dispatch.
Rename ThreadPool.EnsureVMInitialized to ThreadPool.EnsureInitialized.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-24 00:09:19 +01:00
Marek Safar 39b9e2099f Move Task to shared partition (dotnet/coreclr#22105)
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
Marek Safar 5f59e8f9a3 Move TplEtwProvider to shared partition (dotnet/coreclr#22120)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-22 10:14:37 +01:00
Marek Safar 65b441964e Move Task factory type to shared partition (dotnet/coreclr#22089)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-21 12:08:53 +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 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
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
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
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 d8690f8f83 Move public interface ISymDocumentWriter to shared location (#21931)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-11 08:15:57 +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
Marek Safar 56e0b9448b Moves EnvironmentVariableTarget enum to shared partition (#21930)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-10 19:07:21 +01:00
Levi Broderick baa8cf7312 Move OperationStatus into shared source (dotnet/coreclr#21912)
This is the first step to moving OperationStatus from corefx into coreclr. It'll be used by the transcoding APIs which live in System.Private.CoreLib.

Signed-off-by: dotnet-bot <[email protected]>
2019-01-10 10:41:03 +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
Marek Safar 65a2c8a396 Moves StackTrace to shared partition (dotnet/coreclr#21757)
* Moves StackTrace to shared partition

* Remove obsolete comment

* StackFrame::GetFileName behaves like property, remove SecurityException

* Adjust CoreRT ifdefs, fix names for consistency

Signed-off-by: dotnet-bot <[email protected]>
2019-01-07 18:45:48 +01:00
Marek Safar 6e11c95a84 Adds portable version of EncodingTable (dotnet/coreclr#21735)
* Adds portable version of EncodingTable

Most of the implementation is extracted from CoreRT

* Use string comparer directly

* Remove no longer used COMNlsInfo

* Adds localization support

* Removes FeatureCoreFxGlobalization configuration

* Remove redudant encodings look up from GetEncoding

* Keep Hashtable for nameToCodePage as it does not lock on read

* Replace locked dictionary lookup with short switch

* Include comment with msbuild task link used to generate the data file

Signed-off-by: dotnet-bot <[email protected]>
2019-01-04 09:29:04 +01:00
Marek Safar 3de77f3c60 Moves Attribute instance bits to shared location (dotnet/corert#6747)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-02 16:46:39 +01:00
Filip Navara 5eb676ddea Remove dummy globalization implementation. (dotnet/corert#6756)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-02 16:37:27 +01:00
Marek Safar 02c1851501 Moves AppContext to shared location (dotnet/coreclr#21734)
Signed-off-by: dotnet-bot <[email protected]>
2019-01-02 10:05:59 +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
Marek Safar c508d6d3c9 Moves CriticalHandle to shared location
Signed-off-by: dotnet-bot <[email protected]>
2018-12-31 10:44:45 +01:00
Marek Safar 081c438508 Moves generic comparers to shared CoreLib (dotnet/coreclr#21649)
* Moves generic comparer to shared CoreLib

* Keep Index/LastIndexOf optimizations in CoreCLR only

* Moved runtime-specific enum helper to runtime-specific partial type

Signed-off-by: dotnet-bot <[email protected]>
2018-12-30 10:55:01 +01:00
Marek Safar a2e68c76cd Moves ThrowHelper to shared location (dotnet/corert#6741)
Signed-off-by: dotnet-bot <[email protected]>
2018-12-30 00:21:46 +01:00