Copy ctor handling for crossgen2 (#40113)
authorDavid Wrighton <davidwr@microsoft.com>
Thu, 30 Jul 2020 19:04:45 +0000 (12:04 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Jul 2020 19:04:45 +0000 (12:04 -0700)
commit65b8cf21a4c1396082498ea41abee85913865497
tree41eb1ca12437ab0a4d196a7464ac8ecb2ad2b04c
parenta87ee38f833d6d9b9d428b99530791abedbcc160
Copy ctor handling for crossgen2 (#40113)

- Add IL based test for copy ctor to allow testing in Crossgen2 which doesn't yet support IJW
- Add api to determine proper EmbeddedSignatureData index for these
  - And tests to ensure this remains functional
- Marshaller changes to recognize copy constructor cases
  - Note that there isn't actual marshaller support. Instead the compiler can now able to detect when copy ctors should be used, and falls back to the runtime interop layer
src/coreclr/src/tools/Common/TypeSystem/Common/MethodDesc.cs
src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs
src/coreclr/src/tools/Common/TypeSystem/Interop/IL/MarshalUtils.cs
src/coreclr/src/tools/Common/TypeSystem/Interop/IL/Marshaller.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Interop/IL/Marshaller.ReadyToRun.cs
src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ILTestAssembly/Signature.il
src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/SignatureTests.cs
src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.cs [new file with mode: 0644]
src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorTest.csproj [new file with mode: 0644]
src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorUtil.il [new file with mode: 0644]
src/tests/Interop/PInvoke/Miscellaneous/CopyCtor/CopyCtorUtil.ilproj [new file with mode: 0644]