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:
authordotnet-bot <dotnet-bot@microsoft.com>2017-10-05 03:07:58 +0300
committerdotnet-bot <dotnet-bot@microsoft.com>2017-10-05 03:07:58 +0300
commit6916c3e87d1e1054e705d6de871656c6e72e4479 (patch)
tree5d2e4537e25627be3479410005085561dc680ce1 /src/ILCompiler.Compiler
parent24e0c77c507f60409cf6ceaec0820d1e40f17326 (diff)
ProjectX: Ensure GC desc dependencies for static fields
[tfs-changeset: 1677319]
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs4
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GenericLookupResult.cs6
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/UtcThreadStaticsNode.cs3
3 files changed, 10 insertions, 3 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
index 150469206..e80d799de 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
@@ -69,6 +69,10 @@ namespace ILCompiler.DependencyAnalysis
if (_preInitFieldInfos != null)
dependencyList.Add(factory.GCStaticsPreInitDataNode(_type), "PreInitData node");
}
+ else
+ {
+ dependencyList.Add(((UtcNodeFactory)factory).TypeGCStaticDescSymbol(_type), "GC Desc");
+ }
dependencyList.Add(factory.GCStaticIndirection(_type), "GC statics indirection");
return dependencyList;
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GenericLookupResult.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GenericLookupResult.cs
index 0198e5b33..3fcd00b16 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GenericLookupResult.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GenericLookupResult.cs
@@ -283,7 +283,7 @@ namespace ILCompiler.DependencyAnalysis
/// <summary>
/// Generic lookup result that points to an EEType where if the type is Nullable&lt;X&gt; the EEType is X
/// </summary>
- internal sealed class UnwrapNullableTypeHandleGenericLookupResult : GenericLookupResult
+ public sealed class UnwrapNullableTypeHandleGenericLookupResult : GenericLookupResult
{
private TypeDesc _type;
@@ -313,6 +313,7 @@ namespace ILCompiler.DependencyAnalysis
sb.Append(nameMangler.GetMangledTypeName(_type));
}
+ public TypeDesc Type => _type;
public override string ToString() => $"UnwrapNullable: {_type}";
public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factory)
@@ -604,7 +605,7 @@ namespace ILCompiler.DependencyAnalysis
/// <summary>
/// Generic lookup result that points to a method dictionary.
/// </summary>
- internal sealed class MethodDictionaryGenericLookupResult : GenericLookupResult
+ public sealed class MethodDictionaryGenericLookupResult : GenericLookupResult
{
private MethodDesc _method;
@@ -640,6 +641,7 @@ namespace ILCompiler.DependencyAnalysis
sb.Append(nameMangler.GetMangledMethodName(_method));
}
+ public MethodDesc Method => _method;
public override string ToString() => $"MethodDictionary: {_method}";
public override NativeLayoutVertexNode TemplateDictionaryNode(NodeFactory factory)
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/UtcThreadStaticsNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/UtcThreadStaticsNode.cs
index 895084104..c998cb55f 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/UtcThreadStaticsNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/UtcThreadStaticsNode.cs
@@ -42,6 +42,7 @@ namespace ILCompiler.DependencyAnalysis
dependencyList.Add(factory.EagerCctorIndirection(_type.GetStaticConstructor()), "Eager .cctor");
}
+ dependencyList.Add(((UtcNodeFactory)factory).TypeThreadStaticGCDescNode(_type), "GC Desc");
return dependencyList;
}
@@ -59,4 +60,4 @@ namespace ILCompiler.DependencyAnalysis
return builder.ToObjectData();
}
}
-} \ No newline at end of file
+}