summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ToolBox/superpmi/superpmi-shim-collector/superpmi-shim-collector.cpp38
-rw-r--r--src/ToolBox/superpmi/superpmi-shim-counter/superpmi-shim-counter.cpp38
-rw-r--r--src/ToolBox/superpmi/superpmi-shim-simple/superpmi-shim-simple.cpp38
-rw-r--r--src/ToolBox/superpmi/superpmi/jitinstance.cpp36
-rw-r--r--src/inc/corjit.h2
-rw-r--r--src/jit/ClrJit.PAL.exports1
-rw-r--r--src/jit/ClrJit.exports1
-rw-r--r--src/jit/armelnonjit/armelnonjit.def1
-rw-r--r--src/jit/dll/clrjit.def1
-rw-r--r--src/jit/ee_il_dll.cpp2
-rw-r--r--src/jit/jittelemetry.cpp2
-rw-r--r--src/jit/protojit/protojit.def1
-rw-r--r--src/jit/protononjit/protononjit.def1
-rw-r--r--src/vm/codeman.cpp74
-rw-r--r--src/vm/jitinterface.cpp17
-rw-r--r--src/zap/zapper.cpp13
16 files changed, 105 insertions, 161 deletions
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 a2a01b14a7..71d0e49a2b 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 96996ee270..65ec7242e9 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 07663c8bce..60fa17dcc6 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 9f904a6d41..85d7ca0b74 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<DWORD, DWORD>* forceOptions,
LightWeightMap<DWORD, DWORD>* 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 20ff2b3055..6892e06a2c 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 f53923fa68..b27c61f6b1 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 60a223bab1..41a37dbcf9 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 1603af74ca..e229be40aa 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 1603af74ca..e229be40aa 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 882c9bcbca..a1f3c8c2c6 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 9498791981..021fb45cc4 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 1603af74ca..e229be40aa 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 1603af74ca..e229be40aa 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 f475541283..059690631e 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 c38c53d60b..de9538e6c2 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 b22fe62cca..26d9c4e2cf 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)