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:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2016-04-22 06:59:15 +0300
committerMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2016-04-22 06:59:15 +0300
commit6dd0e94bfabfa4de73bb66382c38fca15c1eedee (patch)
tree36719ea24fb81b052b2a241fbb133ab39603d4d8 /src/Native/Runtime/RuntimeInstance.cpp
parentb07a75e331ccbb8b1138a4722d60c0a63491be90 (diff)
Extend EETypes with information about generic composition (#1171)
In CoreRT we will not be using the `GenericInstanceDesc` mechanism from Redhawk/Project N. Instead, generic composition (the generic type definition, generic type arguments, arity, and variance) will be directly available from the EEType by following two new rare fields. The rare fields being added: * `ETF_GenericDefinition`: pointer to the EEType of the generic type definition * `ETF_GenericComposition`: pointer to a variable sized stream of data with the following grammar: ARITY | GENERIC_TYPE_ARGUMENT+ | GENERIC_VARIANCE*. Generic variance is present only when GenericVarianceFlag is set on the EEType.
Diffstat (limited to 'src/Native/Runtime/RuntimeInstance.cpp')
-rw-r--r--src/Native/Runtime/RuntimeInstance.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Native/Runtime/RuntimeInstance.cpp b/src/Native/Runtime/RuntimeInstance.cpp
index 251e060c7..0bfcc723f 100644
--- a/src/Native/Runtime/RuntimeInstance.cpp
+++ b/src/Native/Runtime/RuntimeInstance.cpp
@@ -796,10 +796,20 @@ COOP_PINVOKE_HELPER(EEType *, RhGetGenericInstantiation, (EEType *
EEType *** ppInstantiation,
GenericVarianceType ** ppVarianceInfo))
{
+#if CORERT
+ *pArity = pEEType->get_GenericArity();
+ *ppInstantiation = pEEType->get_GenericArguments();
+ if (pEEType->HasGenericVariance())
+ *ppVarianceInfo = pEEType->get_GenericVariance();
+ else
+ *ppVarianceInfo = NULL;
+ return pEEType->get_GenericDefinition();
+#else
return GetRuntimeInstance()->GetGenericInstantiation(pEEType,
pArity,
ppInstantiation,
ppVarianceInfo);
+#endif
}
COOP_PINVOKE_HELPER(bool, RhSetGenericInstantiation, (EEType * pEEType,