From c655adc31d7a08987781656349b760befc1c6899 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Tue, 24 Jan 2017 20:09:16 +0900 Subject: [PATCH] Simplify #ifdef related with UnwindStackFrame (dotnet/coreclr#9052) Commit migrated from https://github.com/dotnet/coreclr/commit/69e3c50ee80a16fd4d2c287422ed7c4d1056b667 --- src/coreclr/src/inc/eetwain.h | 4 ++++ src/coreclr/src/vm/eetwain.cpp | 24 ++++++++++-------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/coreclr/src/inc/eetwain.h b/src/coreclr/src/inc/eetwain.h index 49ea207..5b88be3 100644 --- a/src/coreclr/src/inc/eetwain.h +++ b/src/coreclr/src/inc/eetwain.h @@ -192,6 +192,7 @@ virtual TADDR GetAmbientSP(PREGDISPLAY pContext, */ virtual ULONG32 GetStackParameterSize(EECodeInfo* pCodeInfo) = 0; +#ifndef CROSSGEN_COMPILE /* Unwind the current stack frame, i.e. update the virtual register set in pContext. This will be similar to the state after the function @@ -205,6 +206,7 @@ virtual bool UnwindStackFrame(PREGDISPLAY pContext, unsigned flags, CodeManState *pState, StackwalkCacheUnwindInfo *pUnwindInfo) = 0; +#endif // CROSSGEN_COMPILE /* Is the function currently at a "GC safe point" ? @@ -410,6 +412,7 @@ TADDR GetAmbientSP(PREGDISPLAY pContext, virtual ULONG32 GetStackParameterSize(EECodeInfo* pCodeInfo); +#ifndef CROSSGEN_COMPILE /* Unwind the current stack frame, i.e. update the virtual register set in pContext. This will be similar to the state after the function @@ -425,6 +428,7 @@ bool UnwindStackFrame( unsigned flags, CodeManState *pState, StackwalkCacheUnwindInfo *pUnwindInfo); +#endif // CROSSGEN_COMPILE enum QuickUnwindFlag { diff --git a/src/coreclr/src/vm/eetwain.cpp b/src/coreclr/src/vm/eetwain.cpp index de65605..8bbe213 100644 --- a/src/coreclr/src/vm/eetwain.cpp +++ b/src/coreclr/src/vm/eetwain.cpp @@ -3982,7 +3982,8 @@ bool UnwindStackFrame(PREGDISPLAY pContext, #endif // _TARGET_X86_ -#if defined(_TARGET_X86_) && !defined(WIN64EXCEPTIONS) +#ifndef CROSSGEN_COMPILE +#ifndef WIN64EXCEPTIONS /***************************************************************************** * @@ -4000,11 +4001,16 @@ bool EECodeManager::UnwindStackFrame(PREGDISPLAY pContext, CodeManState *pState, StackwalkCacheUnwindInfo *pUnwindInfo /* out-only, perf improvement */) { +#ifdef _TARGET_X86_ return ::UnwindStackFrame(pContext, pCodeInfo, flags, pState, pUnwindInfo); +#else // _TARGET_X86_ + PORTABILITY_ASSERT("EECodeManager::UnwindStackFrame"); + return false; +#endif // _TARGET_???_ } /*****************************************************************************/ -#elif !defined(CROSSGEN_COMPILE) // _TARGET_X86_ - UnwindStackFrame +#else // !WIN64EXCEPTIONS /*****************************************************************************/ bool EECodeManager::UnwindStackFrame(PREGDISPLAY pContext, @@ -4034,19 +4040,9 @@ bool EECodeManager::UnwindStackFrame(PREGDISPLAY pContext, } /*****************************************************************************/ -#else // _TARGET_X86_ - UnwindStackFrame - -bool EECodeManager::UnwindStackFrame(PREGDISPLAY pContext, - EECodeInfo *pCodeInfo, - unsigned flags, - CodeManState *pState, - StackwalkCacheUnwindInfo *pUnwindInfo /* out-only, perf improvement */) -{ - _ASSERTE(!"EECodeManager::UnwindStackFrame not supported in this build configuration"); - return true; -} +#endif // WIN64EXCEPTIONS +#endif // !CROSSGEN_COMPILE -#endif // _TARGET_X86_ - UnwindStackFrame /*****************************************************************************/ /* report args in 'msig' to the GC. -- 2.7.4