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>2017-09-01 01:34:22 +0300
committerGitHub <noreply@github.com>2017-09-01 01:34:22 +0300
commit5474549233d8bac3d6617a26cd20b25ca1b98604 (patch)
tree2d835400c3be683c625a356ef2d3ef01512f744a /src/System.Private.TypeLoader
parent239cd2a622edb0277715123a1305c67c8fa4a79d (diff)
parentf61d77cf347f921991902274cfdb7eb310b0e641 (diff)
Merge pull request #4435 from dotnet/nmirror
Merge nmirror to master
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r--src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs4
-rw-r--r--src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/genericdictionarycell.cs2
-rw-r--r--src/System.Private.TypeLoader/src/Internal/TypeSystem/CanonTypes.Runtime.cs1
-rw-r--r--src/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs2
4 files changed, 9 insertions, 0 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs
index a23b0453b..7296204a0 100644
--- a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs
+++ b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/TypeBuilder.cs
@@ -505,9 +505,11 @@ namespace Internal.Runtime.TypeLoader
// If so, use that, otherwise, run down the template type loader path with the universal template
if ((state.TemplateType == null) || isTemplateUniversalCanon)
{
+#if !CORERT
// CanonAlike types do not get dictionaries
if ((state.TemplateType == null) && (type.IsConstructedOverType(type.Context.CanonAlikeTypeArray)))
return;
+#endif
// ReadyToRun case - Native Layout is just the dictionary
NativeParser readyToRunInfoParser = state.GetParserForReadyToRunNativeLayoutInfo();
@@ -641,12 +643,14 @@ namespace Internal.Runtime.TypeLoader
TypeLoaderLogger.WriteLine("Found BagElementKind.DictionaryLayout");
Debug.Assert(!isTemplateUniversalCanon, "Universal template nativelayout do not have DictionaryLayout");
+#if !CORERT
if (type.IsConstructedOverType(type.Context.CanonAlikeTypeArray))
{
TypeLoaderLogger.WriteLine("Type is CanonAlike, skip generation of dictionary");
typeInfoParser.SkipInteger();
break;
}
+#endif
Debug.Assert(state.Dictionary == null);
if (!state.TemplateType.RetrieveRuntimeTypeHandleIfPossible())
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/genericdictionarycell.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/genericdictionarycell.cs
index 2ddeff53c..83a13d089 100644
--- a/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/genericdictionarycell.cs
+++ b/src/System.Private.TypeLoader/src/Internal/Runtime/TypeLoader/genericdictionarycell.cs
@@ -737,11 +737,13 @@ namespace Internal.Runtime.TypeLoader
bool methodRequestedIsCanonical = Method.IsCanonicalMethod(CanonicalFormKind.Specific);
MethodDesc canonAlikeForm;
+#if !CORERT
if (methodRequestedIsCanonical)
{
canonAlikeForm = Method.ReplaceTypesInConstructionOfMethod(Method.Context.CanonTypeArray, Method.Context.CanonAlikeTypeArray);
}
else
+#endif
{
canonAlikeForm = Method;
}
diff --git a/src/System.Private.TypeLoader/src/Internal/TypeSystem/CanonTypes.Runtime.cs b/src/System.Private.TypeLoader/src/Internal/TypeSystem/CanonTypes.Runtime.cs
index b7f4f5bc5..ce05945b4 100644
--- a/src/System.Private.TypeLoader/src/Internal/TypeSystem/CanonTypes.Runtime.cs
+++ b/src/System.Private.TypeLoader/src/Internal/TypeSystem/CanonTypes.Runtime.cs
@@ -5,6 +5,7 @@
using System;
+using Internal.Runtime;
using Internal.Runtime.Augments;
namespace Internal.TypeSystem
diff --git a/src/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs b/src/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs
index 5ed63432f..75564a154 100644
--- a/src/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs
+++ b/src/System.Private.TypeLoader/src/Internal/TypeSystem/TypeSystemContext.Runtime.cs
@@ -647,6 +647,7 @@ namespace Internal.TypeSystem
_typesToFlushTypeSystemStateFrom = null;
}
+#if !CORERT
private TypeDesc _canonAlikeType;
public TypeDesc CanonAlikeType
@@ -681,6 +682,7 @@ namespace Internal.TypeSystem
return _canonTypeArray;
}
}
+#endif
#if ECMA_METADATA_SUPPORT
public class ModuleToEcmaModuleHashtable : LockFreeReaderHashtable<EcmaModuleInfo, Internal.TypeSystem.Ecma.EcmaModule>