diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-11-12 02:12:23 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2017-11-12 02:12:23 +0300 |
commit | e0416c0125d05331e444a8fa1db35eb32d82baa9 (patch) | |
tree | 52ad9b7dfa5e491fb02afb66ffa2c5f07a0305bf /src/Runtime.Base | |
parent | f2445930d6efbaebb10eeecc4c0a565c9fac90e3 (diff) |
Define CORERT for ProjectN builds
CoreRT is component of ProjectN (aka .NET Native for UWP), but our current defines do not reflect it because of CORERT is not defined in ProjectN builds. This creates confusion for folks outside the core runtime team, and conflicts with our documentation. For example, https://github.com/dotnet/corert/blob/master/Documentation/intro-to-corert.md says "CoreRT is the .NET Core runtime that is optimized for AOT scenarios, which .NET Native targets". It does not say "CoreRT is the .NET Core runtime optimized for AOT scenarios that uses RyuJIT backend" or anything like that.
- Before this change:
PROJECTN: defined in closed source ProjectN builds
CORERT: defined in open source CoreRT builds
CORECLR: defined in CoreCLR builds
- After this change:
PROJECTN: defined in closed source ProjectN builds (same)
CORERT: defined in both open source CoreRT builds and closed source ProjectN builds (different)
CORECLR: defined in CoreCLR builds (same)
[tfs-changeset: 1680901]
Diffstat (limited to 'src/Runtime.Base')
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs | 8 | ||||
-rw-r--r-- | src/Runtime.Base/src/System/Runtime/EETypePtr.cs | 4 | ||||
-rw-r--r-- | src/Runtime.Base/src/System/RuntimeTypeHandle.cs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs b/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs index 4bd520a25..3a1e8a954 100644 --- a/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs +++ b/src/Runtime.Base/src/System/Runtime/EEType.Runtime.cs @@ -29,12 +29,12 @@ namespace Internal.Runtime if (pGetArrayEEType != IntPtr.Zero) return (EEType*)CalliIntrinsics.Call<IntPtr>(pGetArrayEEType); } -#if CORERT - EH.FallbackFailFast(RhFailFastReason.InternalError, null); - return null; -#else +#if PROJECTN fixed (EEType* pThis = &this) return InternalCalls.RhpGetArrayBaseType(pThis); +#else + EH.FallbackFailFast(RhFailFastReason.InternalError, null); + return null; #endif } diff --git a/src/Runtime.Base/src/System/Runtime/EETypePtr.cs b/src/Runtime.Base/src/System/Runtime/EETypePtr.cs index 26355a84a..1ea073625 100644 --- a/src/Runtime.Base/src/System/Runtime/EETypePtr.cs +++ b/src/Runtime.Base/src/System/Runtime/EETypePtr.cs @@ -40,8 +40,8 @@ namespace System return (Internal.Runtime.EEType*)(void*)_value; } -#if CORERT - // This only works on CoreRT (with no fallback) because Runtime.Base doesn't have enough infrastructure +#if !PROJECTN + // This does not work on ProjectN (with no fallback) because Runtime.Base doesn't have enough infrastructure // to let us express typeof(T).TypeHandle.ToEETypePtr(). [Intrinsic] internal static EETypePtr EETypePtrOf<T>() diff --git a/src/Runtime.Base/src/System/RuntimeTypeHandle.cs b/src/Runtime.Base/src/System/RuntimeTypeHandle.cs index 018057b33..37c592696 100644 --- a/src/Runtime.Base/src/System/RuntimeTypeHandle.cs +++ b/src/Runtime.Base/src/System/RuntimeTypeHandle.cs @@ -21,7 +21,7 @@ namespace System { private EETypePtr _pEEType; -#if CORERT +#if !PROJECTN [Intrinsic] internal static unsafe IntPtr GetValueInternal(RuntimeTypeHandle handle) { |