Skip to content

Commit 664c8f9

Browse files
authored
Remove unused FailFast FCALL implementation. (#98907)
The managed side was deleted in 2017: dotnet/coreclr@ee5862c#diff-f3cc002d15620a31440d8091873e5a2eff9f0223cd11cce621eb1eb1efda52c2 Contributes a little to #95695
1 parent 5ef47c8 commit 664c8f9

File tree

2 files changed

+6
-25
lines changed

2 files changed

+6
-25
lines changed

src/coreclr/classlibnative/bcltype/system.cpp

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ WCHAR *g_pFailFastBuffer = g_szFailFastBuffer;
145145

146146
// This is the common code for FailFast processing that is wrapped by the two
147147
// FailFast FCalls below.
148-
void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExceptionForWatsonBucketing, UINT_PTR retAddress, UINT exitCode, STRINGREF refErrorSourceString)
148+
void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExceptionForWatsonBucketing, UINT_PTR retAddress, STRINGREF refErrorSourceString)
149149
{
150150
CONTRACTL
151151
{
@@ -282,7 +282,7 @@ void SystemNative::GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExce
282282
if (gc.refExceptionForWatsonBucketing != NULL)
283283
pThread->SetLastThrownObject(gc.refExceptionForWatsonBucketing);
284284

285-
EEPolicy::HandleFatalError(exitCode, retAddress, pszMessage, NULL, errorSourceString, argExceptionString);
285+
EEPolicy::HandleFatalError(COR_E_FAILFAST, retAddress, pszMessage, NULL, errorSourceString, argExceptionString);
286286

287287
GCPROTECT_END();
288288
}
@@ -301,25 +301,7 @@ FCIMPL1(VOID, SystemNative::FailFast, StringObject* refMessageUNSAFE)
301301
UINT_PTR retaddr = HELPER_METHOD_FRAME_GET_RETURN_ADDRESS();
302302

303303
// Call the actual worker to perform failfast
304-
GenericFailFast(refMessage, NULL, retaddr, COR_E_FAILFAST, NULL);
305-
306-
HELPER_METHOD_FRAME_END();
307-
}
308-
FCIMPLEND
309-
310-
FCIMPL2(VOID, SystemNative::FailFastWithExitCode, StringObject* refMessageUNSAFE, UINT exitCode)
311-
{
312-
FCALL_CONTRACT;
313-
314-
STRINGREF refMessage = (STRINGREF)refMessageUNSAFE;
315-
316-
HELPER_METHOD_FRAME_BEGIN_1(refMessage);
317-
318-
// The HelperMethodFrame knows how to get the return address.
319-
UINT_PTR retaddr = HELPER_METHOD_FRAME_GET_RETURN_ADDRESS();
320-
321-
// Call the actual worker to perform failfast
322-
GenericFailFast(refMessage, NULL, retaddr, exitCode, NULL);
304+
GenericFailFast(refMessage, NULL, retaddr, NULL);
323305

324306
HELPER_METHOD_FRAME_END();
325307
}
@@ -338,7 +320,7 @@ FCIMPL2(VOID, SystemNative::FailFastWithException, StringObject* refMessageUNSAF
338320
UINT_PTR retaddr = HELPER_METHOD_FRAME_GET_RETURN_ADDRESS();
339321

340322
// Call the actual worker to perform failfast
341-
GenericFailFast(refMessage, refException, retaddr, COR_E_FAILFAST, NULL);
323+
GenericFailFast(refMessage, refException, retaddr, NULL);
342324

343325
HELPER_METHOD_FRAME_END();
344326
}
@@ -358,7 +340,7 @@ FCIMPL3(VOID, SystemNative::FailFastWithExceptionAndSource, StringObject* refMes
358340
UINT_PTR retaddr = HELPER_METHOD_FRAME_GET_RETURN_ADDRESS();
359341

360342
// Call the actual worker to perform failfast
361-
GenericFailFast(refMessage, refException, retaddr, COR_E_FAILFAST, errorSource);
343+
GenericFailFast(refMessage, refException, retaddr, errorSource);
362344

363345
HELPER_METHOD_FRAME_END();
364346
}

src/coreclr/classlibnative/bcltype/system.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class SystemNative
4444
static FCDECL0(INT32, GetExitCode);
4545

4646
static FCDECL1(VOID, FailFast, StringObject* refMessageUNSAFE);
47-
static FCDECL2(VOID, FailFastWithExitCode, StringObject* refMessageUNSAFE, UINT exitCode);
4847
static FCDECL2(VOID, FailFastWithException, StringObject* refMessageUNSAFE, ExceptionObject* refExceptionUNSAFE);
4948
static FCDECL3(VOID, FailFastWithExceptionAndSource, StringObject* refMessageUNSAFE, ExceptionObject* refExceptionUNSAFE, StringObject* errorSourceUNSAFE);
5049

@@ -55,7 +54,7 @@ class SystemNative
5554

5655
private:
5756
// Common processing code for FailFast
58-
static void GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExceptionForWatsonBucketing, UINT_PTR retAddress, UINT exitCode, STRINGREF errorSource);
57+
static void GenericFailFast(STRINGREF refMesgString, EXCEPTIONREF refExceptionForWatsonBucketing, UINT_PTR retAddress, STRINGREF errorSource);
5958
};
6059

6160
extern "C" void QCALLTYPE Environment_Exit(INT32 exitcode);

0 commit comments

Comments
 (0)