Expose a hosting interface for the JIT.
authorPat Gavlin <pagavlin@microsoft.com>
Tue, 23 Feb 2016 21:53:32 +0000 (13:53 -0800)
committerPat Gavlin <pagavlin@microsoft.com>
Tue, 23 Feb 2016 21:53:32 +0000 (13:53 -0800)
commit976def5aa1f339665e76e520ec635c7bbfe4068a
tree32e6a58c77d237cebd1369c6d1cc671d4b06a605
parent2917a226ff5c4b2ffd46d1f632b37f8a583cef25
Expose a hosting interface for the JIT.

This is the first significant step towards removing the JIT's dependence on utilcode.
This change introduces a new interface, `ICorJitHost`, that allows functionality that
would usually be provided by the OS to be overridden by the program that is hosting
the JIT. At the moment, this is limited to memory allocation and configuration value
(e.g. environment variable) access. If the JIT exports a function named `jitStartup`,
an instance of the `ICorJitHost` must be provided via that function before the first
call to `getJit`.

The VM and other implementors of the JIT interface have been updated accordingly.
Most implementors should use the common implementation of `ICorJitHost` (cleverly
named `JitHost`) in utilcode which respects the CLR's hosting policy.

Note that this change does not update RyuJIT (or any other JITs) to use any of the
functionality exposed by `ICorJitHost`; that work is left for future changes.

[tfs-changeset: 1578176]

Commit migrated from https://github.com/dotnet/coreclr/commit/dfd6ab2348b4b151bb90d3bd7deb6a7304bbafac
22 files changed:
src/coreclr/src/inc/corinfo.h
src/coreclr/src/inc/corjit.h
src/coreclr/src/inc/corjithost.h [new file with mode: 0644]
src/coreclr/src/inc/jithost.h [new file with mode: 0644]
src/coreclr/src/jit/ClrJit.exports
src/coreclr/src/jit/dll/clrjit.def
src/coreclr/src/jit/ee_il_dll.cpp
src/coreclr/src/jit/jitpch.h
src/coreclr/src/jit/protojit/protojit.def
src/coreclr/src/utilcode/CMakeLists.txt
src/coreclr/src/utilcode/UtilCode.vcproj
src/coreclr/src/utilcode/UtilCode.vcxproj
src/coreclr/src/utilcode/jithost.cpp [new file with mode: 0644]
src/coreclr/src/utilcode/utilcode.settings.targets
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/vm/codeman.h
src/coreclr/src/vm/jitinterface.cpp
src/coreclr/src/vm/jitinterface.h
src/coreclr/src/zap/common.h
src/coreclr/src/zap/zapinfo.cpp
src/coreclr/src/zap/zapinfo.h
src/coreclr/src/zap/zapper.cpp