summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2017-02-24 22:47:31 +0100
committerGitHub <noreply@github.com>2017-02-24 22:47:31 +0100
commit65053424c296f1fecb4c293276771accfe838e62 (patch)
tree6b26b44e1ed164ec5ec3c47a8f55c538f99e4157
parent7a98a60545b94cb0be5e2998109222640a76654b (diff)
downloadcoreclr-65053424c296f1fecb4c293276771accfe838e62.tar.gz
coreclr-65053424c296f1fecb4c293276771accfe838e62.tar.bz2
coreclr-65053424c296f1fecb4c293276771accfe838e62.zip
Remove NakedThrowHelper and ifdef-out its callers (#9771)
This change removes NakedThrowHelper function for Unix since it was not used. It also ifdefs out its upstream callers.
-rw-r--r--src/vm/amd64/unixstubs.cpp5
-rw-r--r--src/vm/arm/ehhelpers.S21
-rw-r--r--src/vm/arm64/asmhelpers.S21
-rw-r--r--src/vm/excep.cpp24
4 files changed, 15 insertions, 56 deletions
diff --git a/src/vm/amd64/unixstubs.cpp b/src/vm/amd64/unixstubs.cpp
index e7f49577e4..eba5cc2971 100644
--- a/src/vm/amd64/unixstubs.cpp
+++ b/src/vm/amd64/unixstubs.cpp
@@ -11,11 +11,6 @@ extern "C"
PORTABILITY_ASSERT("Implement for PAL");
}
- void NakedThrowHelper()
- {
- PORTABILITY_ASSERT("Implement for PAL");
- }
-
void PInvokeStubForHost()
{
PORTABILITY_ASSERT("Implement for PAL");
diff --git a/src/vm/arm/ehhelpers.S b/src/vm/arm/ehhelpers.S
index 1c8b5c04c1..27f246c607 100644
--- a/src/vm/arm/ehhelpers.S
+++ b/src/vm/arm/ehhelpers.S
@@ -75,27 +75,6 @@ OFFSET_OF_FRAME=(4 + SIZEOF__GSCookie)
.endm
// ------------------------------------------------------------------
-//
-// Helpers for async (NullRef, AccessViolation) exceptions
-//
-
- NESTED_ENTRY NakedThrowHelper2,_TEXT,UnhandledExceptionHandlerUnix
- push {r0, lr}
-
- // On entry:
- //
- // R0 = Address of FaultingExceptionFrame
- bl C_FUNC(LinkFrameAndThrow)
-
- // Target should not return.
- EMIT_BREAKPOINT
-
- NESTED_END NakedThrowHelper2, _TEXT
-
-
- GenerateRedirectedStubWithFrame NakedThrowHelper, NakedThrowHelper2
-
-// ------------------------------------------------------------------
// This helper enables us to call into a funclet after applying the non-volatiles
NESTED_ENTRY CallEHFunclet, _TEXT, NoHandler
diff --git a/src/vm/arm64/asmhelpers.S b/src/vm/arm64/asmhelpers.S
index 64ec15319c..b318ad9efa 100644
--- a/src/vm/arm64/asmhelpers.S
+++ b/src/vm/arm64/asmhelpers.S
@@ -1012,27 +1012,6 @@ NESTED_END CallEHFilterFunclet, _TEXT
// ------------------------------------------------------------------
-//
-// Helpers for async (NullRef, AccessViolation) exceptions
-//
-
-NESTED_ENTRY NakedThrowHelper2, _TEXT ,UnhandledExceptionHandlerUnix
- PROLOG_SAVE_REG_PAIR_INDEXED fp,lr, -16
-
- // On entry:
- //
- // X0 = Address of FaultingExceptionFrame
- bl C_FUNC(LinkFrameAndThrow)
-
- // Target should not return.
- EMIT_BREAKPOINT
-
-NESTED_END NakedThrowHelper2, _TEXT
-
-
-GenerateRedirectedStubWithFrame NakedThrowHelper, NakedThrowHelper2
-
-// ------------------------------------------------------------------
// ResolveWorkerChainLookupAsmStub
//
// This method will perform a quick chained lookup of the entry if the
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp
index 6c427399c3..630d3f5f37 100644
--- a/src/vm/excep.cpp
+++ b/src/vm/excep.cpp
@@ -6969,6 +6969,8 @@ bool IsGcMarker(DWORD exceptionCode, CONTEXT *pContext)
return false;
}
+#ifndef FEATURE_PAL
+
// Return true if the access violation is well formed (has two info parameters
// at the end)
static inline BOOL
@@ -7040,6 +7042,8 @@ IsDebuggerFault(EXCEPTION_RECORD *pExceptionRecord,
return false;
}
+#endif // FEATURE_PAL
+
#ifdef WIN64EXCEPTIONS
#ifndef _TARGET_X86_
@@ -7188,6 +7192,8 @@ AdjustContextForWriteBarrier(
#endif // ELSE
}
+#if defined(USE_FEF) && !defined(FEATURE_PAL)
+
struct SavedExceptionInfo
{
EXCEPTION_RECORD m_ExceptionRecord;
@@ -7242,9 +7248,6 @@ struct SavedExceptionInfo
}
};
-
-#if defined(USE_FEF)
-
SavedExceptionInfo g_SavedExceptionInfo; // Globals are guaranteed zero-init;
void InitSavedExceptionInfo()
@@ -7322,13 +7325,13 @@ void HandleManagedFault(EXCEPTION_RECORD* pExceptionRecord,
SetIP(pContext, GetEEFuncEntryPoint(NakedThrowHelper));
}
-#else // USE_FEF
+#else // USE_FEF && !FEATURE_PAL
void InitSavedExceptionInfo()
{
}
-#endif // USE_FEF
+#endif // USE_FEF && !FEATURE_PAL
//
// Init a new frame
@@ -7442,6 +7445,8 @@ bool ShouldHandleManagedFault(
return true;
}
+#ifndef FEATURE_PAL
+
LONG WINAPI CLRVectoredExceptionHandlerPhase2(PEXCEPTION_POINTERS pExceptionInfo);
enum VEH_ACTION
@@ -7877,7 +7882,6 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandlerPhase3(PEXCEPTION_POINTERS pExcepti
// Remember the EIP for stress debugging purposes.
g_LastAccessViolationEIP = (void*) ::GetIP(pContext);
-#ifndef FEATURE_PAL
// Note: we have a holder, called AVInRuntimeImplOkayHolder, that tells us that its okay to have an
// AV in the Runtime's implementation in certain places. So, if its okay to have an AV at this
// time, then skip the check for whether or not the AV is in our impl.
@@ -7941,7 +7945,6 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandlerPhase3(PEXCEPTION_POINTERS pExcepti
EEPOLICY_HANDLE_FATAL_ERROR_USING_EXCEPTION_INFO(COR_E_EXECUTIONENGINE, pExceptionInfo);
}
}
-#endif // !FEATURE_PAL
}
}
else if (exceptionCode == BOOTUP_EXCEPTION_COMPLUS)
@@ -7953,6 +7956,8 @@ VEH_ACTION WINAPI CLRVectoredExceptionHandlerPhase3(PEXCEPTION_POINTERS pExcepti
return VEH_NO_ACTION;
}
+#endif // !FEATURE_PAL
+
BOOL IsIPInEE(void *ip)
{
WRAPPER_NO_CONTRACT;
@@ -8161,6 +8166,8 @@ public:
#endif // defined(_TARGET_X86_)
+#ifndef FEATURE_PAL
+
LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
{
//
@@ -8308,7 +8315,6 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
}
#ifdef _DEBUG
-#ifndef FEATURE_PAL
#ifndef WIN64EXCEPTIONS
{
CantAllocHolder caHolder;
@@ -8373,7 +8379,6 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
}
}
}
-#endif // !FEATURE_PAL
#endif // _DEBUG
#ifndef WIN64EXCEPTIONS
@@ -8390,6 +8395,7 @@ LONG WINAPI CLRVectoredExceptionHandlerShim(PEXCEPTION_POINTERS pExceptionInfo)
return result;
}
+#endif // !FEATURE_PAL
// Contains the handle to the registered VEH
static PVOID g_hVectoredExceptionHandler = NULL;