Move GCHandle to shared (dotnet/coreclr#22499)
authorStephen Toub <stoub@microsoft.com>
Mon, 11 Feb 2019 21:52:51 +0000 (16:52 -0500)
committerJan Kotas <jkotas@microsoft.com>
Mon, 11 Feb 2019 21:52:51 +0000 (13:52 -0800)
commit9112e8ca13a2c314e839ef2139a0f9344105533c
treeac617eec3373385fb190f0f379dc436c51e4fa7b
parentfc31e9e203300a3b3bacb7c0b2ade12d3f2cec1a
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

Commit migrated from https://github.com/dotnet/coreclr/commit/55dd4d44e5af6afd9ad8eef1ced2e8437c422269
18 files changed:
src/coreclr/src/System.Private.CoreLib/Resources/Strings.resx
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.sln
src/coreclr/src/System.Private.CoreLib/src/System/RtType.cs
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.CoreCLR.cs [new file with mode: 0644]
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandleCookieTable.cs [deleted file]
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/InteropServices/GcHandle.cs [deleted file]
src/coreclr/src/System.Private.CoreLib/src/System/mda.cs
src/coreclr/src/vm/appdomain.hpp
src/coreclr/src/vm/ecalllist.h
src/coreclr/src/vm/marshalnative.cpp
src/coreclr/src/vm/marshalnative.h
src/coreclr/tests/CoreFX/CoreFX.issues.json
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ArrayWithOffset.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandle.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/GCHandleType.cs [new file with mode: 0644]
src/libraries/System.Private.CoreLib/src/System/ThrowHelper.cs