diff options
author | David Wrighton <david_wrighton@outlook.com> | 2017-07-25 18:07:36 +0300 |
---|---|---|
committer | Morgan Brown <morganb@microsoft.com> | 2017-09-15 01:33:27 +0300 |
commit | 1288038cb7de3f0c6f42d6c5f897e53118c019f0 (patch) | |
tree | 40312a4b89facb9c4ea9dd4781504c74817879de /src/ILCompiler.Compiler | |
parent | d808c0d7631fa76eabc80215a58aaf12b1e84430 (diff) |
ObjectWriter initial work
Diffstat (limited to 'src/ILCompiler.Compiler')
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs | 8 | ||||
-rw-r--r-- | src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs index a18c7c6a2..64936d5fe 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/ArrayOfEmbeddedDataNode.cs @@ -11,12 +11,17 @@ using Internal.TypeSystem; namespace ILCompiler.DependencyAnalysis { + public interface IHasStartSymbol + { + ObjectAndOffsetSymbolNode StartSymbol { get; } + } + /// <summary> /// Represents an array of <typeparamref name="TEmbedded"/> nodes. The contents of this node will be emitted /// by placing a starting symbol, followed by contents of <typeparamref name="TEmbedded"/> nodes (optionally /// sorted using provided comparer), followed by ending symbol. /// </summary> - public class ArrayOfEmbeddedDataNode<TEmbedded> : ObjectNode + public class ArrayOfEmbeddedDataNode<TEmbedded> : ObjectNode, IHasStartSymbol where TEmbedded : EmbeddedObjectNode { private HashSet<TEmbedded> _nestedNodes = new HashSet<TEmbedded>(); @@ -43,6 +48,7 @@ namespace ILCompiler.DependencyAnalysis { _nestedNodesList.Add(symbol); } + symbol.ContainingNode = this; } } diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs index 220ae23eb..3d5c5c310 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EmbeddedObjectNode.cs @@ -16,12 +16,14 @@ namespace ILCompiler.DependencyAnalysis private int _offset; + public IHasStartSymbol ContainingNode { get; set; } + public EmbeddedObjectNode() { _offset = InvalidOffset; } - protected int OffsetFromBeginningOfArray + public int OffsetFromBeginningOfArray { get { |