summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonghyun Park <parjong@gmail.com>2017-02-04 02:50:29 +0900
committerJan Kotas <jkotas@microsoft.com>2017-02-03 09:50:29 -0800
commitacc2b37fa57cc0a25c88d54c82a23632400b38b9 (patch)
tree376ed73311fcfd72dc4fea0d6213717d340bd785
parent0f02eb4f3b77fd8908baf4b61f4bf0bf99c2928d (diff)
downloadcoreclr-acc2b37fa57cc0a25c88d54c82a23632400b38b9.tar.gz
coreclr-acc2b37fa57cc0a25c88d54c82a23632400b38b9.tar.bz2
coreclr-acc2b37fa57cc0a25c88d54c82a23632400b38b9.zip
[x86/Linux] Clean up non-WIN64EXCEPTIONS code: (#9305)
-rw-r--r--src/inc/eetwain.h4
-rw-r--r--src/vm/eetwain.cpp14
-rw-r--r--src/vm/excep.cpp13
3 files changed, 7 insertions, 24 deletions
diff --git a/src/inc/eetwain.h b/src/inc/eetwain.h
index 126317eb94..ddcc1361f6 100644
--- a/src/inc/eetwain.h
+++ b/src/inc/eetwain.h
@@ -322,6 +322,7 @@ virtual unsigned int GetFrameSize(GCInfoToken gcInfoToken) = 0;
/* Debugger API */
+#ifndef WIN64EXCEPTIONS
virtual const BYTE* GetFinallyReturnAddr(PREGDISPLAY pReg)=0;
virtual BOOL IsInFilter(GCInfoToken gcInfoToken,
@@ -329,7 +330,6 @@ virtual BOOL IsInFilter(GCInfoToken gcInfoToken,
PCONTEXT pCtx,
DWORD curNestLevel) = 0;
-#ifndef WIN64EXCEPTIONS
virtual BOOL LeaveFinally(GCInfoToken gcInfoToken,
unsigned offset,
PCONTEXT pCtx) = 0;
@@ -598,12 +598,12 @@ unsigned int GetFrameSize(GCInfoToken gcInfoToken);
#ifndef DACCESS_COMPILE
+#ifndef WIN64EXCEPTIONS
virtual const BYTE* GetFinallyReturnAddr(PREGDISPLAY pReg);
virtual BOOL IsInFilter(GCInfoToken gcInfoToken,
unsigned offset,
PCONTEXT pCtx,
DWORD curNestLevel);
-#ifndef WIN64EXCEPTIONS
virtual BOOL LeaveFinally(GCInfoToken gcInfoToken,
unsigned offset,
PCONTEXT pCtx);
diff --git a/src/vm/eetwain.cpp b/src/vm/eetwain.cpp
index 132e54d479..ea3a576244 100644
--- a/src/vm/eetwain.cpp
+++ b/src/vm/eetwain.cpp
@@ -5699,16 +5699,12 @@ unsigned int EECodeManager::GetFrameSize(GCInfoToken gcInfoToken)
/*****************************************************************************/
+#ifndef WIN64EXCEPTIONS
const BYTE* EECodeManager::GetFinallyReturnAddr(PREGDISPLAY pReg)
{
LIMITED_METHOD_CONTRACT;
-#ifdef _TARGET_X86_
return *(const BYTE**)(size_t)(GetRegdisplaySP(pReg));
-#else
- PORTABILITY_ASSERT("EECodeManager::GetFinallyReturnAddr is not implemented on this platform.");
- return NULL;
-#endif
}
BOOL EECodeManager::IsInFilter(GCInfoToken gcInfoToken,
@@ -5721,8 +5717,6 @@ BOOL EECodeManager::IsInFilter(GCInfoToken gcInfoToken,
GC_NOTRIGGER;
} CONTRACTL_END;
-#ifdef _TARGET_X86_
-
/* Extract the necessary information from the info block header */
hdrInfo info;
@@ -5747,15 +5741,9 @@ BOOL EECodeManager::IsInFilter(GCInfoToken gcInfoToken,
// _ASSERTE(nestingLevel == curNestLevel);
return frameType == FR_FILTER;
-
-#else
- PORTABILITY_ASSERT("EECodeManager::IsInFilter is not implemented on this platform.");
- return FALSE;
-#endif
}
-#ifndef WIN64EXCEPTIONS
BOOL EECodeManager::LeaveFinally(GCInfoToken gcInfoToken,
unsigned offset,
PCONTEXT pCtx)
diff --git a/src/vm/excep.cpp b/src/vm/excep.cpp
index 0346c85666..78a8f0e6eb 100644
--- a/src/vm/excep.cpp
+++ b/src/vm/excep.cpp
@@ -1644,6 +1644,7 @@ const char *TCFStringFromConst(TRY_CATCH_FINALLY tcf)
}
#endif //LOGGING
+#ifndef WIN64EXCEPTIONS
// We're unwinding if we'll return to the EE's code. Otherwise
// we'll return to someplace in the current code. Anywhere outside
// this function is "EE code".
@@ -1675,7 +1676,6 @@ bool FinallyIsUnwinding(EHRangeTreeNode *pNode,
return false;
}
-#ifndef WIN64EXCEPTIONS
BOOL LeaveCatch(ICodeManager* pEECM,
Thread *pThread,
CONTEXT *pCtx,
@@ -1690,7 +1690,6 @@ BOOL LeaveCatch(ICodeManager* pEECM,
}
CONTRACTL_END;
-#ifndef FEATURE_PAL
// We can assert these things here, and skip a call
// to COMPlusCheckForAbort later.
@@ -1708,10 +1707,6 @@ BOOL LeaveCatch(ICodeManager* pEECM,
SetSP(pCtx, (UINT_PTR)esp);
return TRUE;
-#else // FEATURE_PAL
- PORTABILITY_ASSERT("LeaveCatch");
- return FALSE;
-#endif
}
#endif // WIN64EXCEPTIONS
@@ -1926,7 +1921,7 @@ HRESULT IsLegalTransition(Thread *pThread,
case TCF_NONE:
case TCF_TRY:
{
-#if !defined(WIN64EXCEPTIONS)
+#ifndef WIN64EXCEPTIONS
if (!FinallyIsUnwinding(pNode, pEECM, pReg, addrStart))
{
CONTEXT *pFilterCtx = pThread->GetFilterContext();
@@ -1946,14 +1941,14 @@ HRESULT IsLegalTransition(Thread *pThread,
{
return CORDBG_E_CANT_SET_IP_OUT_OF_FINALLY;
}
-#else // _WIN64
+#else // !WIN64EXCEPTIONS
// <NOTE>
// Setting IP out of a non-unwinding finally clause is not supported on WIN64EXCEPTIONS because of funclets.
// This scenario is disabled with approval from VS because it's not considered to be a common user
// scenario.
// </NOTE>
return CORDBG_E_CANT_SET_IP_OUT_OF_FINALLY_ON_WIN64;
-#endif // _WIN64
+#endif // WIN64EXCEPTIONS
break;
}