diff options
author | Andrew Au <andrewau@microsoft.com> | 2017-10-13 05:58:51 +0300 |
---|---|---|
committer | Andrew Au <andrewau@microsoft.com> | 2017-10-13 05:58:51 +0300 |
commit | 3cbf7f14f1f899d653a99639e9904293097e5d5c (patch) | |
tree | 0b657d5b8f78a854896c918fb786131dc2f5fbbd /src/System.Private.TypeLoader | |
parent | 26170b1b8f1d63345fe38b9da2e48d9a787a7500 (diff) |
FuncEvalInterfaceDispatch - Allow calling method defined on an interface through FuncEval.
[tfs-changeset: 1678023]
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r-- | src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs index 68767c58b..84fd6e436 100644 --- a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs +++ b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs @@ -9,6 +9,7 @@ using Internal.Runtime.CompilerServices; using Internal.Runtime.TypeLoader; using Internal.TypeSystem; using System.Diagnostics; +using System.Runtime.CompilerServices; // The following definitions are required for interop with the VS Debugger // Prior to making any changes to these, please reach out to the VS Debugger @@ -84,6 +85,12 @@ namespace Internal.Runtime.DebuggerSupport return entryPoint; } + public static unsafe IntPtr GetInterfaceDispatchFunctionPointer(IntPtr thisPointer, RuntimeTypeHandle interfaceType, uint virtualMethodSlot) + { + object instance = Unsafe.As<IntPtr, object>(ref thisPointer); + return RuntimeAugments.ResolveDispatch(instance, interfaceType, (int)virtualMethodSlot); + } + public static bool CallingConverterDataFromMethodSignature(LowLevelNativeFormatReader reader, ulong[] externalReferences, out bool hasThis, |