From edf68bdeb1766326712150eb433e67c39de64d59 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 11 Nov 2015 10:05:51 -0800 Subject: Delete FEATURE_CLR_EH define It been always set for years and there are no plans to build the runtime without it. --- src/Runtime.Base/src/Runtime.Base.csproj | 4 ---- src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs | 12 ------------ src/Runtime.Base/src/System/Runtime/InternalCalls.cs | 4 ---- src/Runtime.Base/src/System/Runtime/StackFrameIterator.cs | 5 ----- src/Runtime.Base/src/System/Runtime/TypeCast.cs | 2 -- 5 files changed, 27 deletions(-) (limited to 'src/Runtime.Base') diff --git a/src/Runtime.Base/src/Runtime.Base.csproj b/src/Runtime.Base/src/Runtime.Base.csproj index 40dc61963..ff880c929 100644 --- a/src/Runtime.Base/src/Runtime.Base.csproj +++ b/src/Runtime.Base/src/Runtime.Base.csproj @@ -56,10 +56,6 @@ true - - FEATURE_CLR_EH;FEATURE_SHARED_GENERICS;$(DefineConstants) - - FEATURE_GC_STRESS;$(DefineConstants) diff --git a/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index c97d1defc..2780bb2f2 100644 --- a/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#define FEATURE_CLR_EH - using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -46,31 +44,26 @@ namespace System.Runtime internal static void BeginFirstPass(Exception e, byte* faultingIP, UIntPtr faultingFrameSP) { -#if FEATURE_CLR_EH s_cachedEventMask = InternalCalls.RhpGetRequestedExceptionEvents(); if ((s_cachedEventMask & ExceptionEventKind.Thrown) == 0) return; InternalCalls.RhpSendExceptionEventToDebugger(ExceptionEventKind.Thrown, faultingIP, faultingFrameSP); -#endif // FEATURE_CLR_EH } internal static void FirstPassFrameEntered(Exception e, byte* enteredFrameIP, UIntPtr enteredFrameSP) { -#if FEATURE_CLR_EH s_cachedEventMask = InternalCalls.RhpGetRequestedExceptionEvents(); if ((s_cachedEventMask & ExceptionEventKind.FirstPassFrameEntered) == 0) return; InternalCalls.RhpSendExceptionEventToDebugger(ExceptionEventKind.FirstPassFrameEntered, enteredFrameIP, enteredFrameSP); -#endif // FEATURE_CLR_EH } internal static void EndFirstPass(Exception e, byte* handlerIP, UIntPtr handlingFrameSP) { -#if FEATURE_CLR_EH if (handlerIP == null) { if ((s_cachedEventMask & ExceptionEventKind.Unhandled) == 0) @@ -83,7 +76,6 @@ namespace System.Runtime return; InternalCalls.RhpSendExceptionEventToDebugger(ExceptionEventKind.CatchHandlerFound, handlerIP, handlingFrameSP); } -#endif // FEATURE_CLR_EH } internal static void BeginSecondPass() @@ -206,7 +198,6 @@ namespace System.Runtime { } -#if FEATURE_CLR_EH #if ARM const int c_IPAdjustForHardwareFault = 2; #else @@ -269,7 +260,6 @@ namespace System.Runtime // The classlib's funciton should never return and should not throw. If it does, then we fail our way... FailFast(reason, unhandledException); } -#endif // FEATURE_CLR_EH private enum RhEHFrameType { @@ -462,7 +452,6 @@ namespace System.Runtime } } -#if FEATURE_CLR_EH private enum HwExceptionCode : uint { STATUS_REDHAWK_NULL_REFERENCE = 0x00000000u, @@ -953,6 +942,5 @@ namespace System.Runtime { FailFastViaClasslib(RhFailFastReason.PN_UnhandledExceptionFromPInvoke, null, PInvokeCallsiteReturnAddr); } -#endif // FEATURE_CLR_EH } // static class EH } diff --git a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs index c106935a2..526cf4123 100644 --- a/src/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -185,7 +185,6 @@ namespace System.Runtime EETypeRef** ppInstantiation, GenericVariance** ppVarianceInfo); -#if FEATURE_CLR_EH // // StackFrameIterator // @@ -211,7 +210,6 @@ namespace System.Runtime [DllImport(Redhawk.BaseName)] internal static extern unsafe void RhpSendExceptionEventToDebugger(ExceptionEventKind eventKind, byte* ip, UIntPtr sp); -#endif // FEATURE_CLR_EH // // Miscellaneous helpers. @@ -252,7 +250,6 @@ namespace System.Runtime [ManuallyManaged(GcPollPolicy.Never)] internal extern static unsafe IntPtr RhpGetNextFinalizerInitCallback(); -#if FEATURE_CLR_EH [RuntimeImport(Redhawk.BaseName, "RhpCallCatchFunclet")] [MethodImpl(MethodImplOptions.InternalCall)] [ManuallyManaged(GcPollPolicy.Never)] @@ -285,7 +282,6 @@ namespace System.Runtime [MethodImpl(MethodImplOptions.InternalCall)] [ManuallyManaged(GcPollPolicy.Never)] internal extern static unsafe void RhpCopyContextFromExInfo(void* pOSContext, int cbOSContext, EH.PAL_LIMITED_CONTEXT* pPalContext); -#endif // FEATURE_CLR_EH //------------------------------------------------------------------------------------------------------------ diff --git a/src/Runtime.Base/src/System/Runtime/StackFrameIterator.cs b/src/Runtime.Base/src/System/Runtime/StackFrameIterator.cs index d535e0618..8043cf37f 100644 --- a/src/Runtime.Base/src/System/Runtime/StackFrameIterator.cs +++ b/src/Runtime.Base/src/System/Runtime/StackFrameIterator.cs @@ -1,11 +1,8 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -#define FEATURE_CLR_EH using System.Runtime.InteropServices; -#if FEATURE_CLR_EH - namespace System.Runtime { [StructLayout(LayoutKind.Explicit, Size = AsmOffsets.SIZEOF__REGDISPLAY)] @@ -54,5 +51,3 @@ namespace System.Runtime } } } - -#endif // FEATURE_CLR_EH diff --git a/src/Runtime.Base/src/System/Runtime/TypeCast.cs b/src/Runtime.Base/src/System/Runtime/TypeCast.cs index c2bc25ef7..408fd8a0b 100644 --- a/src/Runtime.Base/src/System/Runtime/TypeCast.cs +++ b/src/Runtime.Base/src/System/Runtime/TypeCast.cs @@ -815,7 +815,6 @@ namespace System.Runtime return false; } -#if FEATURE_SHARED_GENERICS // this is necessary for shared generic code - Foo may be executing // for T being an interface, an array or a class [RuntimeExport("RhTypeCast_IsInstanceOf")] @@ -841,7 +840,6 @@ namespace System.Runtime else return CheckCastClass(obj, pvTargetType); } -#endif // Returns true of the two types are equivalent primitive types. Used by array casts. static private unsafe bool ArePrimitveTypesEquivalentSize(EEType* pType1, EEType* pType2) -- cgit v1.2.3