From: Jan Kotas Date: Fri, 24 May 2019 12:34:44 +0000 (-0700) Subject: Remove dependency on IEEMemoryManager (#24755) X-Git-Tag: accepted/tizen/unified/20190813.215958~42^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4134398fd3c91cf3db99972f66fa74d5aa32bcf;p=platform%2Fupstream%2Fcoreclr.git Remove dependency on IEEMemoryManager (#24755) --- diff --git a/src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp b/src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp index a2a01b1..71d0e49 100644 --- a/src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp @@ -84,10 +84,10 @@ void SetLogFilePath() extern "C" #ifdef FEATURE_PAL -DLLEXPORT // For Win32 PAL LoadLibrary emulation + DLLEXPORT // For Win32 PAL LoadLibrary emulation #endif - BOOL - DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) + BOOL + DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { @@ -203,25 +203,23 @@ extern "C" DLLEXPORT void __stdcall sxsJitStartup(CoreClrCallbacks const& origin // get entry point pnsxsJitStartup = (PsxsJitStartup)::GetProcAddress(g_hRealJit, "sxsJitStartup"); - if (pnsxsJitStartup == 0) - { - LogError("sxsJitStartup() - GetProcAddress 'sxsJitStartup' failed (0x%08x)", ::GetLastError()); - return; - } - // Setup CoreClrCallbacks and call sxsJitStartup - original_CoreClrCallbacks = new CoreClrCallbacks(); - original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; - original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; + if (pnsxsJitStartup != nullptr) + { + // Setup CoreClrCallbacks and call sxsJitStartup + original_CoreClrCallbacks = new CoreClrCallbacks(); + original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; + original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; - CoreClrCallbacks* temp = new CoreClrCallbacks(); + CoreClrCallbacks* temp = new CoreClrCallbacks(); - temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - temp->m_pfnIEE = IEE_t; - temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - temp->m_pfnGetCLRFunction = GetCLRFunction; + temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + temp->m_pfnIEE = IEE_t; + temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + temp->m_pfnGetCLRFunction = GetCLRFunction; - pnsxsJitStartup(*temp); + pnsxsJitStartup(*temp); + } } diff --git a/src/ToolBox/superpmi/superpmi-shim-counter/superpmi-shim-counter.cpp b/src/ToolBox/superpmi/superpmi-shim-counter/superpmi-shim-counter.cpp index 96996ee..65ec724 100644 --- a/src/ToolBox/superpmi/superpmi-shim-counter/superpmi-shim-counter.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-counter/superpmi-shim-counter.cpp @@ -70,10 +70,10 @@ void SetLogFilePath() extern "C" #ifdef FEATURE_PAL -DLLEXPORT // For Win32 PAL LoadLibrary emulation + DLLEXPORT // For Win32 PAL LoadLibrary emulation #endif - BOOL - DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) + BOOL + DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { @@ -199,25 +199,23 @@ extern "C" DLLEXPORT void __stdcall sxsJitStartup(CoreClrCallbacks const& origin // get entry point pnsxsJitStartup = (PsxsJitStartup)::GetProcAddress(g_hRealJit, "sxsJitStartup"); - if (pnsxsJitStartup == 0) - { - LogError("sxsJitStartup() - GetProcAddress 'sxsJitStartup' failed (0x%08x)", ::GetLastError()); - return; - } - // Setup CoreClrCallbacks and call sxsJitStartup - original_CoreClrCallbacks = new CoreClrCallbacks(); - original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; - original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; + if (pnsxsJitStartup != nullptr) + { + // Setup CoreClrCallbacks and call sxsJitStartup + original_CoreClrCallbacks = new CoreClrCallbacks(); + original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; + original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; - CoreClrCallbacks* temp = new CoreClrCallbacks(); + CoreClrCallbacks* temp = new CoreClrCallbacks(); - temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - temp->m_pfnIEE = IEE_t; - temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - temp->m_pfnGetCLRFunction = GetCLRFunction; + temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + temp->m_pfnIEE = IEE_t; + temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + temp->m_pfnGetCLRFunction = GetCLRFunction; - pnsxsJitStartup(*temp); + pnsxsJitStartup(*temp); + } } diff --git a/src/ToolBox/superpmi/superpmi-shim-simple/superpmi-shim-simple.cpp b/src/ToolBox/superpmi/superpmi-shim-simple/superpmi-shim-simple.cpp index 07663c8..60fa17d 100644 --- a/src/ToolBox/superpmi/superpmi-shim-simple/superpmi-shim-simple.cpp +++ b/src/ToolBox/superpmi/superpmi-shim-simple/superpmi-shim-simple.cpp @@ -60,10 +60,10 @@ void SetLogFilePath() extern "C" #ifdef FEATURE_PAL -DLLEXPORT // For Win32 PAL LoadLibrary emulation + DLLEXPORT // For Win32 PAL LoadLibrary emulation #endif - BOOL - DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) + BOOL + DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { @@ -174,25 +174,23 @@ extern "C" DLLEXPORT void __stdcall sxsJitStartup(CoreClrCallbacks const& origin // get entry point pnsxsJitStartup = (PsxsJitStartup)::GetProcAddress(g_hRealJit, "sxsJitStartup"); - if (pnsxsJitStartup == 0) - { - LogError("sxsJitStartup() - GetProcAddress 'sxsJitStartup' failed (0x%08x)", ::GetLastError()); - return; - } - // Setup CoreClrCallbacks and call sxsJitStartup - original_CoreClrCallbacks = new CoreClrCallbacks(); - original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; - original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; + if (pnsxsJitStartup != nullptr) + { + // Setup CoreClrCallbacks and call sxsJitStartup + original_CoreClrCallbacks = new CoreClrCallbacks(); + original_CoreClrCallbacks->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + original_CoreClrCallbacks->m_pfnIEE = original_cccallbacks.m_pfnIEE; + original_CoreClrCallbacks->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + original_CoreClrCallbacks->m_pfnGetCLRFunction = original_cccallbacks.m_pfnGetCLRFunction; - CoreClrCallbacks* temp = new CoreClrCallbacks(); + CoreClrCallbacks* temp = new CoreClrCallbacks(); - temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; - temp->m_pfnIEE = IEE_t; - temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; - temp->m_pfnGetCLRFunction = GetCLRFunction; + temp->m_hmodCoreCLR = original_cccallbacks.m_hmodCoreCLR; + temp->m_pfnIEE = IEE_t; + temp->m_pfnGetCORSystemDirectory = original_cccallbacks.m_pfnGetCORSystemDirectory; + temp->m_pfnGetCLRFunction = GetCLRFunction; - pnsxsJitStartup(*temp); + pnsxsJitStartup(*temp); + } } diff --git a/src/ToolBox/superpmi/superpmi/jitinstance.cpp b/src/ToolBox/superpmi/superpmi/jitinstance.cpp index 9f904a6..85d7ca0 100644 --- a/src/ToolBox/superpmi/superpmi/jitinstance.cpp +++ b/src/ToolBox/superpmi/superpmi/jitinstance.cpp @@ -12,10 +12,10 @@ #include "errorhandling.h" #include "spmiutil.h" -JitInstance* JitInstance::InitJit(char* nameOfJit, - bool breakOnAssert, - SimpleTimer* st1, - MethodContext* firstContext, +JitInstance* JitInstance::InitJit(char* nameOfJit, + bool breakOnAssert, + SimpleTimer* st1, + MethodContext* firstContext, LightWeightMap* forceOptions, LightWeightMap* options) { @@ -174,16 +174,14 @@ HRESULT JitInstance::StartUp(char* PathToJit, bool copyJit, bool breakOnDebugBre return -1; } pnsxsJitStartup = (PsxsJitStartup)::GetProcAddress(hLib, "sxsJitStartup"); - if (pnsxsJitStartup == 0) + pnjitStartup = (PjitStartup)::GetProcAddress(hLib, "jitStartup"); + + if (pnsxsJitStartup != nullptr) { - LogError("GetProcAddress 'sxsJitStartup' failed (0x%08x)", ::GetLastError()); - return -1; + // Setup CoreClrCallbacks and call sxsJitStartup + CoreClrCallbacks* cccallbacks = InitCoreClrCallbacks(); + pnsxsJitStartup(*cccallbacks); } - pnjitStartup = (PjitStartup)::GetProcAddress(hLib, "jitStartup"); - - // Setup CoreClrCallbacks and call sxsJitStartup - CoreClrCallbacks* cccallbacks = InitCoreClrCallbacks(); - pnsxsJitStartup(*cccallbacks); // Setup ICorJitHost and call jitStartup if necessary if (pnjitStartup != nullptr) @@ -244,16 +242,14 @@ bool JitInstance::reLoad(MethodContext* firstContext) return false; } pnsxsJitStartup = (PsxsJitStartup)::GetProcAddress(hLib, "sxsJitStartup"); - if (pnsxsJitStartup == 0) + pnjitStartup = (PjitStartup)::GetProcAddress(hLib, "jitStartup"); + + if (pnsxsJitStartup != nullptr) { - LogError("GetProcAddress 'sxsJitStartup' failed (0x%08x)", ::GetLastError()); - return false; + // Setup CoreClrCallbacks and call sxsJitStartup + CoreClrCallbacks* cccallbacks = InitCoreClrCallbacks(); + pnsxsJitStartup(*cccallbacks); } - pnjitStartup = (PjitStartup)::GetProcAddress(hLib, "jitStartup"); - - // Setup CoreClrCallbacks and call sxsJitStartup - CoreClrCallbacks* cccallbacks = InitCoreClrCallbacks(); - pnsxsJitStartup(*cccallbacks); // Setup ICorJitHost and call jitStartup if necessary if (pnjitStartup != nullptr) diff --git a/src/inc/corjit.h b/src/inc/corjit.h index 20ff2b3..6892e06 100644 --- a/src/inc/corjit.h +++ b/src/inc/corjit.h @@ -292,7 +292,7 @@ public: class ICorJitInfo : public ICorDynamicInfo { public: - // return memory manager that the JIT can use to allocate a regular memory + // OBSOLETE: return memory manager that the JIT can use to allocate a regular memory virtual IEEMemoryManager* getMemoryManager() = 0; // get a block of memory for the code, readonly data, and read-write data diff --git a/src/jit/ClrJit.PAL.exports b/src/jit/ClrJit.PAL.exports index f53923f..b27c61f 100644 --- a/src/jit/ClrJit.PAL.exports +++ b/src/jit/ClrJit.PAL.exports @@ -1,6 +1,5 @@ getJit jitStartup -sxsJitStartup DllMain PAL_RegisterModule PAL_UnregisterModule diff --git a/src/jit/ClrJit.exports b/src/jit/ClrJit.exports index 60a223b..41a37db 100644 --- a/src/jit/ClrJit.exports +++ b/src/jit/ClrJit.exports @@ -5,4 +5,3 @@ EXPORTS getJit jitStartup - sxsJitStartup diff --git a/src/jit/armelnonjit/armelnonjit.def b/src/jit/armelnonjit/armelnonjit.def index 1603af7..e229be4 100644 --- a/src/jit/armelnonjit/armelnonjit.def +++ b/src/jit/armelnonjit/armelnonjit.def @@ -4,4 +4,3 @@ EXPORTS getJit jitStartup - sxsJitStartup diff --git a/src/jit/dll/clrjit.def b/src/jit/dll/clrjit.def index 1603af7..e229be4 100644 --- a/src/jit/dll/clrjit.def +++ b/src/jit/dll/clrjit.def @@ -4,4 +4,3 @@ EXPORTS getJit jitStartup - sxsJitStartup diff --git a/src/jit/ee_il_dll.cpp b/src/jit/ee_il_dll.cpp index 882c9bc..a1f3c8c 100644 --- a/src/jit/ee_il_dll.cpp +++ b/src/jit/ee_il_dll.cpp @@ -176,12 +176,14 @@ HINSTANCE GetModuleInst() return (g_hInst); } +#ifndef FEATURE_CORECLR extern "C" DLLEXPORT void __stdcall sxsJitStartup(CoreClrCallbacks const& cccallbacks) { #ifndef SELF_NO_HOST InitUtilcode(cccallbacks); #endif } +#endif // FEATURE_CORECLR #endif // !FEATURE_MERGE_JIT_AND_ENGINE diff --git a/src/jit/jittelemetry.cpp b/src/jit/jittelemetry.cpp index 9498791..021fb45 100644 --- a/src/jit/jittelemetry.cpp +++ b/src/jit/jittelemetry.cpp @@ -69,8 +69,6 @@ // This roughly translates to InitUtilcode() being called before jitDllOnProcessAttach. // // For CLRJIT.dll, compStartup is called on jitOnDllProcessAttach(). -// This can be called twice through sxsJitStartup -- so prevent double initialization. -// UtilCode is init-ed by this time. The same is true for CoreCLR. // // 2) For CLRJIT.dll and CoreCLR, compShutdown will be called during jitOnDllProcessDetach(). // diff --git a/src/jit/protojit/protojit.def b/src/jit/protojit/protojit.def index 1603af7..e229be4 100644 --- a/src/jit/protojit/protojit.def +++ b/src/jit/protojit/protojit.def @@ -4,4 +4,3 @@ EXPORTS getJit jitStartup - sxsJitStartup diff --git a/src/jit/protononjit/protononjit.def b/src/jit/protononjit/protononjit.def index 1603af7..e229be4 100644 --- a/src/jit/protononjit/protononjit.def +++ b/src/jit/protononjit/protononjit.def @@ -4,4 +4,3 @@ EXPORTS getJit jitStartup - sxsJitStartup diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index f475541..0596906 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -1521,8 +1521,6 @@ enum JIT_LOAD_STATUS { JIT_LOAD_STATUS_STARTING = 1001, // The JIT load process is starting. Start at a number that is somewhat uncommon (i.e., not zero or 1) to help distinguish from garbage, in process dumps. JIT_LOAD_STATUS_DONE_LOAD, // LoadLibrary of the JIT dll succeeded. - JIT_LOAD_STATUS_DONE_GET_SXSJITSTARTUP, // GetProcAddress for "sxsJitStartup" succeeded. - JIT_LOAD_STATUS_DONE_CALL_SXSJITSTARTUP, // Calling sxsJitStartup() succeeded. JIT_LOAD_STATUS_DONE_GET_JITSTARTUP, // GetProcAddress for "jitStartup" succeeded. JIT_LOAD_STATUS_DONE_CALL_JITSTARTUP, // Calling jitStartup() succeeded. JIT_LOAD_STATUS_DONE_GET_GETJIT, // GetProcAddress for "getJit" succeeded. @@ -1635,72 +1633,60 @@ static void LoadAndInitializeJIT(LPCWSTR pwzJitName, OUT HINSTANCE* phJit, OUT I EX_TRY { - bool fContinueToLoadJIT = false; - // For CoreCLR, we never use "sxsJitStartup" as that is Desktop utilcode initialization - // specific. Thus, assume we always got - fContinueToLoadJIT = true; + typedef void (__stdcall* pjitStartup)(ICorJitHost*); + pjitStartup jitStartupFn = (pjitStartup) GetProcAddress(*phJit, "jitStartup"); - if (fContinueToLoadJIT) + if (jitStartupFn) { - typedef void (__stdcall* pjitStartup)(ICorJitHost*); - pjitStartup jitStartupFn = (pjitStartup) GetProcAddress(*phJit, "jitStartup"); + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_GET_JITSTARTUP; - if (jitStartupFn) - { - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_GET_JITSTARTUP; + (*jitStartupFn)(JitHost::getJitHost()); - (*jitStartupFn)(JitHost::getJitHost()); + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_JITSTARTUP; + } - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_JITSTARTUP; - } + typedef ICorJitCompiler* (__stdcall* pGetJitFn)(); + pGetJitFn getJitFn = (pGetJitFn) GetProcAddress(*phJit, "getJit"); - typedef ICorJitCompiler* (__stdcall* pGetJitFn)(); - pGetJitFn getJitFn = (pGetJitFn) GetProcAddress(*phJit, "getJit"); + if (getJitFn) + { + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_GET_GETJIT; - if (getJitFn) + ICorJitCompiler* pICorJitCompiler = (*getJitFn)(); + if (pICorJitCompiler != NULL) { - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_GET_GETJIT; - - ICorJitCompiler* pICorJitCompiler = (*getJitFn)(); - if (pICorJitCompiler != NULL) - { - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_GETJIT; + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_GETJIT; - GUID versionId; - memset(&versionId, 0, sizeof(GUID)); - pICorJitCompiler->getVersionIdentifier(&versionId); + GUID versionId; + memset(&versionId, 0, sizeof(GUID)); + pICorJitCompiler->getVersionIdentifier(&versionId); - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_GETVERSIONIDENTIFIER; + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_CALL_GETVERSIONIDENTIFIER; - if (memcmp(&versionId, &JITEEVersionIdentifier, sizeof(GUID)) == 0) - { - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_VERSION_CHECK; + if (memcmp(&versionId, &JITEEVersionIdentifier, sizeof(GUID)) == 0) + { + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE_VERSION_CHECK; - // The JIT has loaded and passed the version identifier test, so publish the JIT interface to the caller. - *ppICorJitCompiler = pICorJitCompiler; + // The JIT has loaded and passed the version identifier test, so publish the JIT interface to the caller. + *ppICorJitCompiler = pICorJitCompiler; - // The JIT is completely loaded and initialized now. - pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE; - } - else - { - // Mismatched version ID. Fail the load. - LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: mismatched JIT version identifier in %S\n", pwzJitName)); - } + // The JIT is completely loaded and initialized now. + pJitLoadData->jld_status = JIT_LOAD_STATUS_DONE; } else { - LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: failed to get ICorJitCompiler in %S\n", pwzJitName)); + // Mismatched version ID. Fail the load. + LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: mismatched JIT version identifier in %S\n", pwzJitName)); } } else { - LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: failed to find 'getJit' entrypoint in %S\n", pwzJitName)); + LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: failed to get ICorJitCompiler in %S\n", pwzJitName)); } } else { - LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: failed to find 'sxsJitStartup' entrypoint in %S\n", pwzJitName)); + LOG((LF_JIT, LL_FATALERROR, "LoadAndInitializeJIT: failed to find 'getJit' entrypoint in %S\n", pwzJitName)); } } EX_CATCH diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index c38c53d..de9538e 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -10852,21 +10852,8 @@ bool CEEInfo::runWithErrorTrap(void (*function)(void*), void* param) /*********************************************************************/ IEEMemoryManager* CEEInfo::getMemoryManager() { - CONTRACTL { - NOTHROW; - GC_NOTRIGGER; - MODE_PREEMPTIVE; - } CONTRACTL_END; - - IEEMemoryManager* result = NULL; - - JIT_TO_EE_TRANSITION_LEAF(); - - result = GetEEMemoryManager(); - - EE_TO_JIT_TRANSITION_LEAF(); - - return result; + UNREACHABLE(); // OBSOLETE + return NULL; } /*********************************************************************/ diff --git a/src/zap/zapper.cpp b/src/zap/zapper.cpp index b22fe62..26d9c4e 100644 --- a/src/zap/zapper.cpp +++ b/src/zap/zapper.cpp @@ -510,19 +510,6 @@ void Zapper::LoadAndInitializeJITForNgen(LPCWSTR pwzJitName, OUT HINSTANCE* phJi ThrowLastError(); } -#if !defined(CROSSGEN_COMPILE) - typedef void (__stdcall* pSxsJitStartup) (CoreClrCallbacks const & cccallbacks); - pSxsJitStartup sxsJitStartupFn = (pSxsJitStartup) GetProcAddress(*phJit, "sxsJitStartup"); - if (sxsJitStartupFn == NULL) - { - Error(W("Unable to load Jit startup function: %s\r\n"), pwzJitName); - ThrowLastError(); - } - - CoreClrCallbacks cccallbacks = GetClrCallbacks(); - (*sxsJitStartupFn) (cccallbacks); -#endif - typedef void (__stdcall* pJitStartup)(ICorJitHost* host); pJitStartup jitStartupFn = (pJitStartup)GetProcAddress(*phJit, "jitStartup"); if (jitStartupFn != nullptr)