Use precompiled PInvoke stubs from R2R image without the shared IL stub (#101)
authorFadi Hanna <fadim@microsoft.com>
Thu, 21 Nov 2019 03:09:43 +0000 (19:09 -0800)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2019 03:09:43 +0000 (19:09 -0800)
commit6c9383841efb12963b898254f14b707ac730dcb7
tree61ba26483d6185bb088bca330979ecd7c86d6660
parentbe8e050a6d27040d6c249382d99d57d973e919b2
Use precompiled PInvoke stubs from R2R image without the shared IL stub (#101)

* Use precompiled PInvoke stubs from R2R image without a shared IL stub

This is only for images compiled with crossgen2.

Changes include some refactoring work around the signature parsing to compute marshalling requirements. We had two separate implementations after pulling the PInvoke work from the single-exe branch. Consolidated into one implementation.
19 files changed:
src/coreclr/src/inc/readytorun.h
src/coreclr/src/tools/crossgen2/Common/Internal/Runtime/ModuleHeaders.cs
src/coreclr/src/tools/crossgen2/Common/JitInterface/CorInfoImpl.cs
src/coreclr/src/tools/crossgen2/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Diagnostic.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Mangling.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.Sorting.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/Common/TypeSystem/IL/Stubs/PInvokeTargetNativeMethod.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/Common/TypeSystem/Interop/IL/Marshaller.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/MethodExtensions.cs [new file with mode: 0644]
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunSingleAssemblyCompilationModuleGroup.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/IL/Stubs/PInvokeILEmitter.cs
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/ILCompiler.ReadyToRun.csproj
src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
src/coreclr/src/tools/crossgen2/ILCompiler.TypeSystem.ReadyToRun/ILCompiler.TypeSystem.ReadyToRun.csproj
src/coreclr/src/tools/r2rdump/R2RHeader.cs
src/coreclr/src/vm/prestub.cpp
src/coreclr/src/vm/readytoruninfo.h