Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2017-11-12 02:12:23 +0300
committerJan Kotas <jkotas@microsoft.com>2017-11-12 02:12:23 +0300
commite0416c0125d05331e444a8fa1db35eb32d82baa9 (patch)
tree52ad9b7dfa5e491fb02afb66ffa2c5f07a0305bf /src/Native/Runtime/MiscHelpers.cpp
parentf2445930d6efbaebb10eeecc4c0a565c9fac90e3 (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/Native/Runtime/MiscHelpers.cpp')
-rw-r--r--src/Native/Runtime/MiscHelpers.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Native/Runtime/MiscHelpers.cpp b/src/Native/Runtime/MiscHelpers.cpp
index 44571df7e..f11129d1d 100644
--- a/src/Native/Runtime/MiscHelpers.cpp
+++ b/src/Native/Runtime/MiscHelpers.cpp
@@ -185,9 +185,7 @@ COOP_PINVOKE_HELPER(HANDLE, RhGetOSModuleFromPointer, (PTR_VOID pPointerVal))
COOP_PINVOKE_HELPER(HANDLE, RhGetOSModuleFromEEType, (EEType * pEEType))
{
-#if CORERT
- return pEEType->GetTypeManagerPtr()->AsTypeManager()->GetOsModuleHandle();
-#else
+#if PROJECTN
#if EETYPE_TYPE_MANAGER
if (pEEType->HasTypeManager())
return pEEType->GetTypeManagerPtr()->AsTypeManager()->GetOsModuleHandle();
@@ -210,14 +208,14 @@ COOP_PINVOKE_HELPER(HANDLE, RhGetOSModuleFromEEType, (EEType * pEEType))
// We should never get here (an EEType not located in any module) so fail fast to indicate the bug.
RhFailFast();
return NULL;
-#endif // !CORERT
+#else
+ return pEEType->GetTypeManagerPtr()->AsTypeManager()->GetOsModuleHandle();
+#endif // PROJECTN
}
COOP_PINVOKE_HELPER(TypeManagerHandle, RhGetModuleFromEEType, (EEType * pEEType))
{
-#if CORERT
- return *pEEType->GetTypeManagerPtr();
-#else
+#if PROJECTN
#if EETYPE_TYPE_MANAGER
if (pEEType->HasTypeManager())
return *pEEType->GetTypeManagerPtr();
@@ -244,7 +242,9 @@ COOP_PINVOKE_HELPER(TypeManagerHandle, RhGetModuleFromEEType, (EEType * pEEType)
// We should never get here (an EEType not located in any module) so fail fast to indicate the bug.
RhFailFast();
return TypeManagerHandle::Null();
-#endif // !CORERT
+#else
+ return *pEEType->GetTypeManagerPtr();
+#endif // PROJECTN
}
COOP_PINVOKE_HELPER(Boolean, RhFindBlob, (TypeManagerHandle *pTypeManagerHandle, UInt32 blobId, UInt8 ** ppbBlob, UInt32 * pcbBlob))
@@ -268,7 +268,7 @@ COOP_PINVOKE_HELPER(Boolean, RhFindBlob, (TypeManagerHandle *pTypeManagerHandle,
return pBlob != NULL;
}
-#if !CORERT
+#if PROJECTN
else
{
HANDLE hOsModule = typeManagerHandle.AsOsModule();
@@ -307,7 +307,7 @@ COOP_PINVOKE_HELPER(Boolean, RhFindBlob, (TypeManagerHandle *pTypeManagerHandle,
}
END_FOREACH_MODULE
}
-#endif // !CORERT
+#endif // PROJECTN
// If we get here we were passed a bad module handle and should fail fast since this indicates a nasty bug
// (which could lead to the wrong blob being returned in some cases).
@@ -384,7 +384,7 @@ COOP_PINVOKE_HELPER(UInt8 *, RhGetThreadStaticFieldAddress, (EEType * pEEType, U
}
else
{
-#if EETYPE_TYPE_MANAGER && !CORERT /* TODO: CORERT */
+#if EETYPE_TYPE_MANAGER && PROJECTN /* TODO: CORERT */
if (pEEType->HasTypeManager())
{
TypeManager* pTypeManager = pEEType->GetTypeManagerPtr()->AsTypeManager();