Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaizur Rahman <shrah@microsoft.com>2017-04-11 22:13:32 +0300
committerFaizur Rahman <shrah@microsoft.com>2017-04-14 21:07:09 +0300
commit3f4b2d1d8acda576cf9f16078bfdf7e44e09b31b (patch)
treef76788df725b17e87bddc0dd32e878c497e6569e /src/ILCompiler.TypeSystem
parent5b3ba17544a3bdcc34504ec7454d7967aa262306 (diff)
Add marshalling support for returning function pointers from native side as Delegates
Diffstat (limited to 'src/ILCompiler.TypeSystem')
-rw-r--r--src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj24
-rw-r--r--src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Mangling.cs25
2 files changed, 49 insertions, 0 deletions
diff --git a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj
index 2d89eb73a..eec6933e8 100644
--- a/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj
+++ b/src/ILCompiler.TypeSystem/src/ILCompiler.TypeSystem.csproj
@@ -416,6 +416,15 @@
<Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.Mangling.cs">
<Link>IL\Stubs\DelegateMarshallingMethodThunk.Mangling.cs</Link>
</Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.cs">
+ <Link>IL\Stubs\ForwardDelegateCreationThunk.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.Mangling.cs">
+ <Link>IL\Stubs\ForwardDelegateCreationThunk.Mangling.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.Sorting.cs">
+ <Link>IL\Stubs\ForwardDelegateCreationThunk.Sorting.cs</Link>
+ </Compile>
<Compile Include="..\..\Common\src\TypeSystem\IL\Stubs\DelegateThunks.cs">
<Link>IL\Stubs\DelegateThunks.cs</Link>
</Compile>
@@ -446,6 +455,21 @@
<Compile Include="TypeSystem\Interop\IL\NativeStructType.Mangling.cs">
<Link>TypeSystem\Interop\IL\NativeStructType.Mangling.cs</Link>
</Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\PInvokeDelegateWrapper.cs">
+ <Link>TypeSystem\Interop\IL\PInvokeDelegateWrapper.cs</Link>
+ </Compile>
+ <Compile Include="TypeSystem\Interop\IL\PInvokeDelegateWrapper.Mangling.cs">
+ <Link>TypeSystem\Interop\IL\PInvokeDelegateWrapper.Mangling.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\PInvokeDelegateWrapper.Sorting.cs">
+ <Link>TypeSystem\Interop\IL\PInvokeDelegateWrapper.Sorting.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.cs">
+ <Link>TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.cs</Link>
+ </Compile>
+ <Compile Include="..\..\Common\src\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.Sorting.cs">
+ <Link>TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.Sorting.cs</Link>
+ </Compile>
<Compile Include="..\..\Common\src\TypeSystem\Interop\IL\InlineArrayType.cs">
<Link>TypeSystem\Interop\IL\InlineArrayType.cs</Link>
</Compile>
diff --git a/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Mangling.cs b/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Mangling.cs
new file mode 100644
index 000000000..679970e53
--- /dev/null
+++ b/src/ILCompiler.TypeSystem/src/TypeSystem/Interop/IL/PInvokeDelegateWrapper.Mangling.cs
@@ -0,0 +1,25 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+namespace Internal.TypeSystem.Interop
+{
+ partial class PInvokeDelegateWrapper : IPrefixMangledType
+ {
+ TypeDesc IPrefixMangledType.BaseType
+ {
+ get
+ {
+ return DelegateType;
+ }
+ }
+
+ string IPrefixMangledType.Prefix
+ {
+ get
+ {
+ return "PInvokeDelegateWrapper";
+ }
+ }
+ }
+}