From f879dfd411609d8b4c1dfe1abb7559a6c1aef6f4 Mon Sep 17 00:00:00 2001 From: Andrew Au Date: Thu, 1 Feb 2018 15:19:01 -0800 Subject: FuncEvalWithAppDomain - supporting FuncEval in case of having multiple AppDomains. [tfs-changeset: 1687664] --- src/Runtime.Base/src/System/Diagnostics/Eval.cs | 16 +++++----------- src/Runtime.Base/src/System/Runtime/CalliIntrinsics.cs | 2 ++ src/Runtime.Base/src/System/Runtime/InternalCalls.cs | 2 ++ 3 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/Runtime.Base') diff --git a/src/Runtime.Base/src/System/Diagnostics/Eval.cs b/src/Runtime.Base/src/System/Diagnostics/Eval.cs index eaa76dfe4..ecb535876 100644 --- a/src/Runtime.Base/src/System/Diagnostics/Eval.cs +++ b/src/Runtime.Base/src/System/Diagnostics/Eval.cs @@ -3,6 +3,7 @@ // See the LICENSE file in the project root for more information. using System; +using System.Diagnostics; using System.Runtime; using System.Runtime.CompilerServices; @@ -10,20 +11,13 @@ namespace System.Diagnostics { public static class Eval { - private static IntPtr s_highLevelDebugFuncEvalHelper; - - [MethodImpl(MethodImplOptions.NoInlining)] - [RuntimeExport("RhpSetHighLevelDebugFuncEvalHelper")] - public static void SetHighLevelDebugFuncEvalHelper(IntPtr ptr) - { - s_highLevelDebugFuncEvalHelper = ptr; - } - [MethodImpl(MethodImplOptions.NoInlining)] [RuntimeExport("RhpDebugFuncEvalHelper")] - public static void RhpDebugFuncEvalHelper() + public unsafe static void RhpDebugFuncEvalHelper(IntPtr unusedTransitionBlock, IntPtr classlibAddress) { - CalliIntrinsics.CallVoid(s_highLevelDebugFuncEvalHelper); + IntPtr pDebugFuncEvalHelper = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromCodeAddress(classlibAddress, ClassLibFunctionId.DebugFuncEvalHelper); + Debug.Assert(pDebugFuncEvalHelper != IntPtr.Zero); + CalliIntrinsics.CallVoid(pDebugFuncEvalHelper); } } } \ No newline at end of file diff --git a/src/Runtime.Base/src/System/Runtime/CalliIntrinsics.cs b/src/Runtime.Base/src/System/Runtime/CalliIntrinsics.cs index d23b9636a..af520c824 100644 --- a/src/Runtime.Base/src/System/Runtime/CalliIntrinsics.cs +++ b/src/Runtime.Base/src/System/Runtime/CalliIntrinsics.cs @@ -11,12 +11,14 @@ namespace System.Runtime internal static unsafe partial class CalliIntrinsics { internal static void CallVoid(IntPtr pfn) { Call(pfn); } + internal static void CallVoid(IntPtr pfn, long arg0) { Call(pfn, arg0); } internal static void CallVoid(IntPtr pfn, object arg0) { Call(pfn, arg0); } internal static void CallVoid(IntPtr pfn, IntPtr arg0, object arg1) { Call(pfn, arg0, arg1); } internal static void CallVoid(IntPtr pfn, RhFailFastReason arg0, object arg1, IntPtr arg2, IntPtr arg3) { Call(pfn, arg0, arg1, arg2, arg3); } internal static void CallVoid(IntPtr pfn, object arg0, IntPtr arg1, int arg2) { Call(pfn, arg0, arg1, arg2); } internal static T Call(IntPtr pfn) { throw new NotImplementedException(); } + internal static T Call(IntPtr pfn, long arg0) { throw new NotImplementedException(); } internal static T Call(IntPtr pfn, object arg0) { throw new NotImplementedException(); } internal static T Call(IntPtr pfn, IntPtr arg0) { throw new NotImplementedException(); } internal static T Call(IntPtr pfn, IntPtr arg0, object arg1) { throw new NotImplementedException(); } diff --git a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs index 89730ba0f..e647e3ab0 100644 --- a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -42,6 +42,8 @@ namespace System.Runtime CheckStaticClassConstruction = 4, GetSystemArrayEEType = 5, OnFirstChance = 6, + DebugFuncEvalHelper = 7, + DebugFuncEvalAbortHelper = 8, } internal static class InternalCalls -- cgit v1.2.3