diff options
author | Andrew Au <andrewau@microsoft.com> | 2018-01-27 00:21:35 +0300 |
---|---|---|
committer | Andrew Au <andrewau@microsoft.com> | 2018-01-27 00:21:35 +0300 |
commit | 3278c57084fbe23c5a358d1cec08f3de157e5507 (patch) | |
tree | cee2974e0763d549f1364fa6205aff43ecb08853 /src/Runtime.Base | |
parent | 3ff89c25070a9d48364274b8572576eb22e04c91 (diff) |
ClassLibForAll - refactor the code so that the type ClasslibFunctionId is no longer a nested type in EH.
[tfs-changeset: 1687171]
Diffstat (limited to 'src/Runtime.Base')
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs | 2 | ||||
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs | 14 | ||||
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/InternalCalls.cs | 18 |
3 files changed, 17 insertions, 17 deletions
diff --git a/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs b/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs index 3a1e8a954..f3b4ff4d4 100644 --- a/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs +++ b/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs @@ -25,7 +25,7 @@ namespace Internal.Runtime { fixed (EEType* pThis = &this) { - IntPtr pGetArrayEEType = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromEEType(new IntPtr(pThis), EH.ClassLibFunctionId.GetSystemArrayEEType); + IntPtr pGetArrayEEType = (IntPtr)InternalCalls.RhpGetClasslibFunctionFromEEType(new IntPtr(pThis), ClassLibFunctionId.GetSystemArrayEEType); if (pGetArrayEEType != IntPtr.Zero) return (EEType*)CalliIntrinsics.Call<IntPtr>(pGetArrayEEType); } diff --git a/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index 761ad5319..8a007c1ba 100644 --- a/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -144,20 +144,6 @@ namespace System.Runtime InternalCalls.RhpFallbackFailFast(); } - // Constants used with RhpGetClasslibFunction, to indicate which classlib function - // we are interested in. - // Note: make sure you change the def in EHHelpers.cpp if you change this! - internal enum ClassLibFunctionId - { - GetRuntimeException = 0, - FailFast = 1, - // UnhandledExceptionHandler = 2, // unused - AppendExceptionStackFrame = 3, - CheckStaticClassConstruction = 4, - GetSystemArrayEEType = 5, - OnFirstChance = 6, - } - // Given an address pointing somewhere into a managed module, get the classlib-defined fail-fast // function and invoke it. Any failure to find and invoke the function, or if it returns, results in // MRT-defined fail-fast behavior. diff --git a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs index 0c4cc3ebf..89730ba0f 100644 --- a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -30,6 +30,20 @@ namespace System.Runtime public uint VTableOffset; } + // Constants used with RhpGetClasslibFunction, to indicate which classlib function + // we are interested in. + // Note: make sure you change the def in ICodeManager.h if you change this! + internal enum ClassLibFunctionId + { + GetRuntimeException = 0, + FailFast = 1, + // UnhandledExceptionHandler = 2, // unused + AppendExceptionStackFrame = 3, + CheckStaticClassConstruction = 4, + GetSystemArrayEEType = 5, + OnFirstChance = 6, + } + internal static class InternalCalls { // @@ -232,12 +246,12 @@ namespace System.Runtime [RuntimeImport(Redhawk.BaseName, "RhpGetClasslibFunctionFromCodeAddress")] [MethodImpl(MethodImplOptions.InternalCall)] [ManuallyManaged(GcPollPolicy.Never)] - internal extern static unsafe void* RhpGetClasslibFunctionFromCodeAddress(IntPtr address, EH.ClassLibFunctionId id); + internal extern static unsafe void* RhpGetClasslibFunctionFromCodeAddress(IntPtr address, ClassLibFunctionId id); [RuntimeImport(Redhawk.BaseName, "RhpGetClasslibFunctionFromEEType")] [MethodImpl(MethodImplOptions.InternalCall)] [ManuallyManaged(GcPollPolicy.Never)] - internal extern static unsafe void* RhpGetClasslibFunctionFromEEType(IntPtr pEEType, EH.ClassLibFunctionId id); + internal extern static unsafe void* RhpGetClasslibFunctionFromEEType(IntPtr pEEType, ClassLibFunctionId id); // // StackFrameIterator |