diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-03-18 08:12:52 -0700 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-03-18 08:12:52 -0700 |
commit | b0d7f96936e4560b02ba4e8d46cb60dfdf086e46 (patch) | |
tree | 8820fcf317cafda88f03a2116348132960bc1028 /src/jit/compiler.h | |
parent | 63bc667a52bc0795b16729bb0e7fddb20395ac4c (diff) | |
download | coreclr-b0d7f96936e4560b02ba4e8d46cb60dfdf086e46.tar.gz coreclr-b0d7f96936e4560b02ba4e8d46cb60dfdf086e46.tar.bz2 coreclr-b0d7f96936e4560b02ba4e8d46cb60dfdf086e46.zip |
Remove JIT-EE version ifdefs (#10273)
* Remove COR_JIT_EE_VERSION define
Currently, we maintain two versions of the JIT-EE interface in the
source tree: the current version, and .NET 4.6 version. This is
managed by the `COR_JIT_EE_VERSION` define. Any new changes to the JIT-EE
interface must be put under `#if COR_JIT_EE_VERSION > 460`. As of now,
there are quite a few of these `#if` statements in the tree.
We started doing this so we could build and ship a CTP (Community
Technology Preview) version of the JIT from the current source tree that
runs against earlier versions of the runtime that are widely available
to customers, so those customers can try out the new JIT and give us
early feedback. This was done during the RyuJIT/x64 bring-up before
shipping .NET 4.6, to get as much feedback as possible before replacing
JIT64. After 4.6 shipped, we re-based the old version of the JIT-EE
interface to the 4.6 version, and started adding the above `#if`
conditions, with the thought that if we ever shipped another CTP, it
would be expected to run on top of 4.6. We have not shipped such a
thing, and we currently have no plans to build another CTP in the same
way we did before. (Early adopters can try out the "live" JIT in the
.NET Core open source project, although that JIT can't be used on the
desktop.)
So, to simplify the code, and reduce the cost of adding to or changing
the JIT-EE interface, we are removing the `COR_JIT_EE_VERSION` define.
Diffstat (limited to 'src/jit/compiler.h')
-rw-r--r-- | src/jit/compiler.h | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/jit/compiler.h b/src/jit/compiler.h index 7baba5da23..07ce7724b2 100644 --- a/src/jit/compiler.h +++ b/src/jit/compiler.h @@ -6561,11 +6561,7 @@ public: // Returns the page size for the target machine as reported by the EE. inline size_t eeGetPageSize() { -#if COR_JIT_EE_VERSION > 460 return eeGetEEInfo()->osPageSize; -#else // COR_JIT_EE_VERSION <= 460 - return CORINFO_PAGE_SIZE; -#endif // COR_JIT_EE_VERSION > 460 } // Returns the frame size at which we will generate a loop to probe the stack. @@ -6583,11 +6579,7 @@ public: inline bool IsTargetAbi(CORINFO_RUNTIME_ABI abi) { -#if COR_JIT_EE_VERSION > 460 return eeGetEEInfo()->targetAbi == abi; -#else - return CORINFO_DESKTOP_ABI == abi; -#endif } inline bool generateCFIUnwindCodes() @@ -7782,28 +7774,20 @@ public: // PInvoke transitions inline (e.g. when targeting CoreRT). inline bool ShouldUsePInvokeHelpers() { -#if COR_JIT_EE_VERSION > 460 return jitFlags->IsSet(JitFlags::JIT_FLAG_USE_PINVOKE_HELPERS); -#else - return false; -#endif } // true if we should use insert the REVERSE_PINVOKE_{ENTER,EXIT} helpers in the method // prolog/epilog inline bool IsReversePInvoke() { -#if COR_JIT_EE_VERSION > 460 return jitFlags->IsSet(JitFlags::JIT_FLAG_REVERSE_PINVOKE); -#else - return false; -#endif } // true if we must generate code compatible with JIT32 quirks inline bool IsJit32Compat() { -#if defined(_TARGET_X86_) && COR_JIT_EE_VERSION > 460 +#if defined(_TARGET_X86_) return jitFlags->IsSet(JitFlags::JIT_FLAG_DESKTOP_QUIRKS); #else return false; @@ -7813,9 +7797,9 @@ public: // true if we must generate code compatible with Jit64 quirks inline bool IsJit64Compat() { -#if defined(_TARGET_AMD64_) && COR_JIT_EE_VERSION > 460 +#if defined(_TARGET_AMD64_) return jitFlags->IsSet(JitFlags::JIT_FLAG_DESKTOP_QUIRKS); -#elif defined(_TARGET_AMD64_) && !defined(FEATURE_CORECLR) +#elif !defined(FEATURE_CORECLR) return true; #else return false; |