Clean up LeaveFinally/LeaveCatch (dotnet/coreclr#9050)
authorJonghyun Park <parjong@gmail.com>
Tue, 24 Jan 2017 09:31:51 +0000 (18:31 +0900)
committerJan Vorlicek <janvorli@microsoft.com>
Tue, 24 Jan 2017 09:31:51 +0000 (10:31 +0100)
* Hide LeaveFinally/LeaveCatch when WIN64EXCEPTION is defined

Commit migrated from https://github.com/dotnet/coreclr/commit/a3d3e5a97bc4d0e59b094cbab32786f95225b357

src/coreclr/src/inc/eetwain.h
src/coreclr/src/vm/eetwain.cpp

index b04379b..1eed18b 100644 (file)
@@ -320,6 +320,7 @@ virtual BOOL            IsInFilter(GCInfoToken gcInfoToken,
                                    PCONTEXT pCtx,
                                    DWORD curNestLevel) = 0;
 
+#ifndef WIN64EXCEPTIONS
 virtual BOOL            LeaveFinally(GCInfoToken gcInfoToken,
                                      unsigned offset,
                                      PCONTEXT pCtx) = 0;
@@ -327,6 +328,7 @@ virtual BOOL            LeaveFinally(GCInfoToken gcInfoToken,
 virtual void            LeaveCatch(GCInfoToken gcInfoToken,
                                    unsigned offset,
                                    PCONTEXT pCtx)=0;
+#endif // WIN64EXCEPTIONS
 
 #ifdef EnC_SUPPORTED
 
@@ -578,16 +580,18 @@ unsigned int GetFrameSize(GCInfoToken gcInfoToken);
 #ifndef DACCESS_COMPILE
 
 virtual const BYTE* GetFinallyReturnAddr(PREGDISPLAY pReg);
-virtual BOOL LeaveFinally(GCInfoToken gcInfoToken,
-                          unsigned offset,
-                          PCONTEXT pCtx);
 virtual BOOL IsInFilter(GCInfoToken gcInfoToken,
                         unsigned offset,
                         PCONTEXT pCtx,
                           DWORD curNestLevel);
+#ifndef WIN64EXCEPTIONS
+virtual BOOL LeaveFinally(GCInfoToken gcInfoToken,
+                          unsigned offset,
+                          PCONTEXT pCtx);
 virtual void LeaveCatch(GCInfoToken gcInfoToken,
                          unsigned offset,
                          PCONTEXT pCtx);
+#endif // WIN64EXCEPTIONS
 
 #ifdef EnC_SUPPORTED
 /*
index b445690..55413f6 100644 (file)
@@ -5729,6 +5729,7 @@ BOOL EECodeManager::IsInFilter(GCInfoToken gcInfoToken,
 }
 
 
+#ifndef WIN64EXCEPTIONS
 BOOL EECodeManager::LeaveFinally(GCInfoToken gcInfoToken,
                                 unsigned offset,
                                 PCONTEXT pCtx)
@@ -5738,7 +5739,6 @@ BOOL EECodeManager::LeaveFinally(GCInfoToken gcInfoToken,
         GC_NOTRIGGER;
     } CONTRACTL_END;
 
-#ifdef _TARGET_X86_
 
     hdrInfo info;
 
@@ -5762,10 +5762,6 @@ BOOL EECodeManager::LeaveFinally(GCInfoToken gcInfoToken,
 
     pCtx->Esp += sizeof(TADDR); // Pop the return value off the stack
     return TRUE;
-#else
-    PORTABILITY_ASSERT("EEJitManager::LeaveFinally is not implemented on this platform.");
-    return FALSE;
-#endif
 }
 
 void EECodeManager::LeaveCatch(GCInfoToken gcInfoToken,
@@ -5777,8 +5773,6 @@ void EECodeManager::LeaveCatch(GCInfoToken gcInfoToken,
         GC_NOTRIGGER;
     } CONTRACTL_END;
 
-#ifdef _TARGET_X86_
-
 #ifdef _DEBUG
     TADDR       baseSP;
     DWORD       nestingLevel;
@@ -5793,13 +5787,8 @@ void EECodeManager::LeaveCatch(GCInfoToken gcInfoToken,
 #endif
 
     return;
-
-#else // !_TARGET_X86_
-    PORTABILITY_ASSERT("EECodeManager::LeaveCatch is not implemented on this platform.");
-    return;
-#endif // _TARGET_X86_
 }
-
+#endif // !WIN64EXCEPTIONS
 #endif // #ifndef DACCESS_COMPILE
 
 #ifdef DACCESS_COMPILE