1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Remove IReadyToRunMethodCodeNode interface (#35085)

`IReadyToRunMethodCodeNode` was useful in the CoreRT repo where we had multiple kinds of method code nodes and needed a common way of setting related method data from the JIT. It's not useful in crossgen2 since we only have `MethodWithGCInfo` representing code nodes.
This commit is contained in:
Simon Nattress 2020-04-17 08:24:11 -07:00 committed by GitHub
parent db315977fb
commit 684a76b1e3
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 28 deletions

View file

@ -291,7 +291,7 @@ namespace Internal.JitInterface
InstructionSetSupport actualSupport = new InstructionSetSupport(_actualInstructionSetSupported, _actualInstructionSetUnsupported, architecture);
var node = _compilation.SymbolNodeFactory.PerMethodInstructionSetSupportFixup(actualSupport);
((MethodWithGCInfo)_methodCodeNode).Fixups.Add(node);
_methodCodeNode.Fixups.Add(node);
}
#endif
PublishProfileData();

View file

@ -1,21 +0,0 @@
// 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 Internal.JitInterface;
using Internal.TypeSystem;
namespace ILCompiler.DependencyAnalysis
{
public interface IReadyToRunMethodCodeNode : IMethodNode, ISymbolDefinitionNode
{
void SetCode(ObjectNode.ObjectData data);
void InitializeFrameInfos(FrameInfo[] frameInfos);
void InitializeGCInfo(byte[] gcInfo);
void InitializeEHInfo(ObjectNode.ObjectData ehInfo);
void InitializeDebugLocInfos(OffsetMapping[] debugLocInfos);
void InitializeDebugVarInfos(NativeVarInfo[] debugVarInfos);
void InitializeDebugEHClauseInfos(DebugEHClauseInfo[] debugEHClauseInfos);
void InitializeInliningInfo(MethodDesc[] inlinedMethods);
}
}

View file

@ -12,7 +12,7 @@ using Internal.TypeSystem;
namespace ILCompiler.DependencyAnalysis.ReadyToRun
{
public class MethodWithGCInfo : ObjectNode, IReadyToRunMethodCodeNode, IMethodBodyNode
public class MethodWithGCInfo : ObjectNode, IMethodBodyNode, ISymbolDefinitionNode
{
public readonly MethodGCInfoNode GCInfoNode;

View file

@ -133,7 +133,6 @@
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\ImportSectionsTableNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\InliningInfoNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\InstanceEntryPointTableNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\IReadyToRunMethodCodeNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\OwnerCompositeExecutableNode.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\PrecodeMethodImport.cs" />
<Compile Include="Compiler\DependencyAnalysis\ReadyToRun\LocalMethodImport.cs" />

View file

@ -136,7 +136,7 @@ namespace Internal.JitInterface
private uint OffsetOfDelegateFirstTarget => (uint)(3 * PointerSize); // Delegate::m_functionPointer
private readonly ReadyToRunCodegenCompilation _compilation;
private IReadyToRunMethodCodeNode _methodCodeNode;
private MethodWithGCInfo _methodCodeNode;
private OffsetMapping[] _debugLocInfos;
private NativeVarInfo[] _debugVarInfos;
private ArrayBuilder<MethodDesc> _inlinedMethods;
@ -204,7 +204,7 @@ namespace Internal.JitInterface
return false;
}
public void CompileMethod(IReadyToRunMethodCodeNode methodCodeNodeNeedingCode)
public void CompileMethod(MethodWithGCInfo methodCodeNodeNeedingCode)
{
bool codeGotPublished = false;
_methodCodeNode = methodCodeNodeNeedingCode;
@ -1503,7 +1503,7 @@ namespace Internal.JitInterface
private void classMustBeLoadedBeforeCodeIsRun(TypeDesc type)
{
ISymbolNode node = _compilation.SymbolNodeFactory.CreateReadyToRunHelper(ReadyToRunHelperId.TypeHandle, type);
((MethodWithGCInfo)_methodCodeNode).Fixups.Add(node);
_methodCodeNode.Fixups.Add(node);
}
private void getCallInfo(ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_RESOLVED_TOKEN* pConstrainedResolvedToken, CORINFO_METHOD_STRUCT_* callerHandle, CORINFO_CALLINFO_FLAGS flags, CORINFO_CALL_INFO* pResult)
@ -2115,7 +2115,7 @@ namespace Internal.JitInterface
pBlockCounts = (BlockCounts*)GetPin(_bbCounts = new byte[count * sizeof(BlockCounts)]);
if (_profileDataNode == null)
{
_profileDataNode = _compilation.NodeFactory.ProfileData((MethodWithGCInfo)_methodCodeNode);
_profileDataNode = _compilation.NodeFactory.ProfileData(_methodCodeNode);
}
return 0;
}