diff options
author | Morgan Brown <morganbr@users.noreply.github.com> | 2017-09-15 04:42:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 04:42:54 +0300 |
commit | 12dd3477d3191790be494ef24dbcb0dabc96a94a (patch) | |
tree | 4cb92b70020724e4edec4ee591b86f4e6dcc2c1a /src/ILCompiler.Compiler | |
parent | 61745f54463e455989a3030bba4d683b6f216a51 (diff) | |
parent | 699b5a08e96333948b5547b27efa68b46265abfd (diff) |
Merge pull request #4480 from morganbr/NetscriptenPR
Experimental WebAssembly support
Diffstat (limited to 'src/ILCompiler.Compiler')
3 files changed, 11 insertions, 3 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 { diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/IObjectDumper.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/IObjectDumper.cs index 0822d7f5b..e694acf52 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/IObjectDumper.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/IObjectDumper.cs @@ -6,7 +6,7 @@ using ObjectData = ILCompiler.DependencyAnalysis.ObjectNode.ObjectData; namespace ILCompiler.DependencyAnalysis { - internal interface IObjectDumper + public interface IObjectDumper { void DumpObjectNode(NameMangler mangler, ObjectNode node, ObjectData objectData); } |