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>2018-05-18 00:04:30 +0300
committerdotnet-bot <dotnet-bot@microsoft.com>2018-05-18 00:04:30 +0300
commitedafa6b8f6100ef941c570363117907714730692 (patch)
tree340b0361f8c24ec75d76995304aa8d9f78df8fbf /src/ILCompiler.Compiler
parentcecadf1808d028de68cddc54529feb526ca7854b (diff)
[tfs-changeset: 1700475]
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/ISymbolNodeWithDebugInfo.cs38
-rw-r--r--src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NonGCStaticsNode.cs4
-rw-r--r--src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj1
4 files changed, 45 insertions, 2 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
index 814ea9756..d41488885 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/GCStaticsNode.cs
@@ -12,7 +12,7 @@ using GCStaticRegionConstants = Internal.Runtime.GCStaticRegionConstants;
namespace ILCompiler.DependencyAnalysis
{
- public class GCStaticsNode : ObjectNode, IExportableSymbolNode, ISortableSymbolNode
+ public class GCStaticsNode : ObjectNode, IExportableSymbolNode, ISortableSymbolNode, ISymbolNodeWithDebugInfo
{
private MetadataType _type;
private List<PreInitFieldInfo> _preInitFieldInfos;
@@ -34,6 +34,8 @@ namespace ILCompiler.DependencyAnalysis
public int Offset => 0;
public MetadataType Type => _type;
+ public IDebugInfo DebugInfo => NullTypeIndexDebugInfo.Instance;
+
public static string GetMangledName(TypeDesc type, NameMangler nameMangler)
{
return nameMangler.NodeMangler.GCStatics(type);
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ISymbolNodeWithDebugInfo.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ISymbolNodeWithDebugInfo.cs
new file mode 100644
index 000000000..971cf7016
--- /dev/null
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ISymbolNodeWithDebugInfo.cs
@@ -0,0 +1,38 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using ILCompiler.DependencyAnalysisFramework;
+using Internal.Text;
+
+namespace ILCompiler.DependencyAnalysis
+{
+ /// <summary>
+ /// Represents a symbol definition with debug info, i.e., the S_GDATA32 record.
+ /// </summary>
+ public interface ISymbolNodeWithDebugInfo : ISymbolDefinitionNode
+ {
+ IDebugInfo DebugInfo { get; }
+ }
+
+ public interface IDebugInfo
+ { }
+
+ public interface ITypeIndexDebugInfo : IDebugInfo
+ {
+ int TypeIndex { get; }
+ }
+
+ public class NullTypeIndexDebugInfo : ITypeIndexDebugInfo
+ {
+ private NullTypeIndexDebugInfo() { }
+
+ public int TypeIndex => 0;
+
+ public static IDebugInfo Instance
+ {
+ get { return new NullTypeIndexDebugInfo(); }
+ }
+ }
+}
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NonGCStaticsNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NonGCStaticsNode.cs
index dc6ade07c..0c90865e9 100644
--- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NonGCStaticsNode.cs
+++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NonGCStaticsNode.cs
@@ -18,7 +18,7 @@ namespace ILCompiler.DependencyAnalysis
/// with the class constructor context if the type has a class constructor that
/// needs to be triggered before the type members can be accessed.
/// </summary>
- public class NonGCStaticsNode : ObjectNode, IExportableSymbolNode, ISortableSymbolNode
+ public class NonGCStaticsNode : ObjectNode, IExportableSymbolNode, ISortableSymbolNode, ISymbolNodeWithDebugInfo
{
private MetadataType _type;
private NodeFactory _factory;
@@ -69,6 +69,8 @@ namespace ILCompiler.DependencyAnalysis
}
}
+ public IDebugInfo DebugInfo => NullTypeIndexDebugInfo.Instance;
+
public override bool IsShareable => EETypeNode.IsTypeNodeShareable(_type);
public MetadataType Type => _type;
diff --git a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
index 9744fa933..c01786931 100644
--- a/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
+++ b/src/ILCompiler.Compiler/src/ILCompiler.Compiler.csproj
@@ -124,6 +124,7 @@
<Compile Include="Compiler\DependencyAnalysis\IMethodBodyNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\IMethodBodyNodeWithFuncletSymbols.cs" />
<Compile Include="Compiler\DependencyAnalysis\ISymbolNodeWithFuncletId.cs" />
+ <Compile Include="Compiler\DependencyAnalysis\ISymbolNodeWithDebugInfo.cs" />
<Compile Include="Compiler\DependencyAnalysis\LoopHijackFlagNode.cs" />
<Compile Include="Compiler\DevirtualizationManager.cs" />
<Compile Include="Compiler\DictionaryLayoutProvider.cs" />