-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#354) FuncPtr conversion via constructor
- Loading branch information
Showing
6 changed files
with
71 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...en.Tests/verified/CodeGenNetInteropTests.FuncPtrInterop_architecture=Dynamic.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Module: Primary | ||
Type: <Module> | ||
Methods: | ||
System.Int32 <Module>::myFunc() | ||
IL_0000: ldc.i4.0 | ||
IL_0001: ret | ||
|
||
System.Int32 <Module>::main() | ||
IL_0000: ldftn System.Int32 <Module>::myFunc() | ||
IL_0006: conv.i | ||
IL_0007: newobj Cesium.Runtime.FuncPtr`1<TDelegate> Cesium.Runtime.FuncPtr`1<System.Func`1<System.Int32>>::.ctor(System.Void*) | ||
IL_000c: call System.Int32 Test::Func(Cesium.Runtime.FuncPtr`1<System.Func`1<System.Int32>>) | ||
IL_0011: ret | ||
|
||
System.Int32 <Module>::<SyntheticEntrypoint>() | ||
Locals: | ||
System.Int32 V_0 | ||
IL_0000: call System.Int32 <Module>::main() | ||
IL_0005: stloc.s V_0 | ||
IL_0007: ldloc.s V_0 | ||
IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) | ||
IL_000e: ldloc.s V_0 | ||
IL_0010: ret |
23 changes: 23 additions & 0 deletions
23
...deGen.Tests/verified/CodeGenNetInteropTests.FuncPtrInterop_architecture=Wide.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Module: Primary | ||
Type: <Module> | ||
Methods: | ||
System.Int32 <Module>::myFunc() | ||
IL_0000: ldc.i4.0 | ||
IL_0001: ret | ||
|
||
System.Int32 <Module>::main() | ||
IL_0000: ldftn System.Int32 <Module>::myFunc() | ||
IL_0006: conv.i | ||
IL_0007: newobj Cesium.Runtime.FuncPtr`1<TDelegate> Cesium.Runtime.FuncPtr`1<System.Func`1<System.Int32>>::.ctor(System.Void*) | ||
IL_000c: call System.Int32 Test::Func(Cesium.Runtime.FuncPtr`1<System.Func`1<System.Int32>>) | ||
IL_0011: ret | ||
|
||
System.Int32 <Module>::<SyntheticEntrypoint>() | ||
Locals: | ||
System.Int32 V_0 | ||
IL_0000: call System.Int32 <Module>::main() | ||
IL_0005: stloc.s V_0 | ||
IL_0007: ldloc.s V_0 | ||
IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) | ||
IL_000e: ldloc.s V_0 | ||
IL_0010: ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters