From 875a5776e51d45bb9910dd7c3dce51f3c1ba457b Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Fri, 7 Apr 2017 13:46:12 -0700 Subject: [PATCH] Hook jitinterface into GetRuntimeLookupSignatureName --Implement GetRuntimeLookupSignatureNameForClass/GetRuntimeLookupSignatureNameForMethod in bridge code --GetRuntimeLookupSignatureNameForMethod is used for all usg lookups, regardless of whether method is generic/nongeneric. In the case of a nongeneric method, I do lookup using TypeDesc instead of MethodDesc. --Call these from jitinterface instead of the stub code. --Made method NativeLayoutSignature public so its callable from the bridge --Made class NativeLayoutSignatureNode public as method NativeLayoutSignature is now public --Merged method signature and type signature hashtables into a single hashtable GlobalNameLookUpSignatureMap ----This lets us avoid creating multiple SSRs for identical types ----This is a possible perf hit since we're indexing on char* now instead of handles - there are a couple options in the future to mitigate this [tfs-changeset: 1653636] --- .../Compiler/DependencyAnalysis/NativeLayoutSignatureNode.cs | 2 +- .../src/Compiler/DependencyAnalysis/NodeFactory.NativeLayout.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutSignatureNode.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutSignatureNode.cs index d59dad5dcde..4877d7e67d2 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutSignatureNode.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NativeLayoutSignatureNode.cs @@ -15,7 +15,7 @@ namespace ILCompiler.DependencyAnalysis /// to the TypeManager that contains the native layout info blob of interest, and the second item /// is an offset into that native layout info blob /// - class NativeLayoutSignatureNode : ObjectNode, ISymbolNode + public class NativeLayoutSignatureNode : ObjectNode, ISymbolNode { private TypeSystemEntity _identity; private Utf8String _identityPrefix; diff --git a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NodeFactory.NativeLayout.cs b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NodeFactory.NativeLayout.cs index 4b87bf21e25..5ba89fc2b01 100644 --- a/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NodeFactory.NativeLayout.cs +++ b/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/NodeFactory.NativeLayout.cs @@ -386,7 +386,7 @@ public bool Equals(NativeLayoutSignatureKey other) } private NodeCache _nativeLayoutSignatureNodes; - internal NativeLayoutSignatureNode NativeLayoutSignature(NativeLayoutSavedVertexNode signature, Utf8String identityPrefix, TypeSystemEntity identity) + public NativeLayoutSignatureNode NativeLayoutSignature(NativeLayoutSavedVertexNode signature, Utf8String identityPrefix, TypeSystemEntity identity) { return _nativeLayoutSignatureNodes.GetOrAdd(new NativeLayoutSignatureKey(signature, identityPrefix, identity)); }