Browse Source

Merge pull request #2179 from cshung/public/update-r2r

Update ILCompiler.Reflection.ReadyToRun
pull/2157/head
Christoph Wille 6 years ago committed by GitHub
parent
commit
97334ef5a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  2. 10
      ILSpy.ReadyToRun/ReadyToRunLanguage.cs

2
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -75,7 +75,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Iced" Version="1.8.0" /> <PackageReference Include="Iced" Version="1.8.0" />
<PackageReference Include="ILCompiler.Reflection.ReadyToRun" Version="1.0.10-alpha" /> <PackageReference Include="ILCompiler.Reflection.ReadyToRun" Version="1.0.11-alpha" />
</ItemGroup> </ItemGroup>
<Target Name="RemoveTransitiveProjectReferences" AfterTargets="IncludeTransitiveProjectReferences"> <Target Name="RemoveTransitiveProjectReferences" AfterTargets="IncludeTransitiveProjectReferences">

10
ILSpy.ReadyToRun/ReadyToRunLanguage.cs

@ -429,7 +429,7 @@ namespace ICSharpCode.ILSpy.ReadyToRun
private static void DecorateCallSite(PEFile currentFile, ITextOutput output, ReadyToRunReader reader, bool showMetadataTokens, bool showMetadataTokensInBase10, Instruction instr) private static void DecorateCallSite(PEFile currentFile, ITextOutput output, ReadyToRunReader reader, bool showMetadataTokens, bool showMetadataTokensInBase10, Instruction instr)
{ {
int importCellAddress = (int)instr.IPRelativeMemoryAddress; int importCellAddress = (int)instr.IPRelativeMemoryAddress;
if (instr.IsCallNearIndirect && reader.ImportCellNames.ContainsKey(importCellAddress)) if (instr.IsCallNearIndirect && reader.ImportSignatures.ContainsKey(importCellAddress))
{ {
output.Write(" ; "); output.Write(" ; ");
ReadyToRunSignature signature = reader.ImportSignatures[(int)instr.IPRelativeMemoryAddress]; ReadyToRunSignature signature = reader.ImportSignatures[(int)instr.IPRelativeMemoryAddress];
@ -466,7 +466,7 @@ namespace ICSharpCode.ILSpy.ReadyToRun
methodRefToken.WriteTo(currentFile, output, Decompiler.Metadata.GenericContext.Empty); methodRefToken.WriteTo(currentFile, output, Decompiler.Metadata.GenericContext.Empty);
break; break;
default: default:
output.WriteLine(reader.ImportCellNames[importCellAddress]); output.WriteLine(reader.ImportSignatures[importCellAddress].ToString(new SignatureFormattingOptions()));
break; break;
} }
output.WriteLine(); output.WriteLine();
@ -512,15 +512,11 @@ namespace ICSharpCode.ILSpy.ReadyToRun
private class ReadyToRunAssemblyResolver : ILCompiler.Reflection.ReadyToRun.IAssemblyResolver private class ReadyToRunAssemblyResolver : ILCompiler.Reflection.ReadyToRun.IAssemblyResolver
{ {
private LoadedAssembly loadedAssembly; private LoadedAssembly loadedAssembly;
public ReadyToRunAssemblyResolver(LoadedAssembly loadedAssembly) public ReadyToRunAssemblyResolver(LoadedAssembly loadedAssembly)
{ {
this.loadedAssembly = loadedAssembly; this.loadedAssembly = loadedAssembly;
} }
public bool Naked => false;
public bool SignatureBinary => false;
public bool InlineSignatureBinary => false;
public IAssemblyMetadata FindAssembly(MetadataReader metadataReader, AssemblyReferenceHandle assemblyReferenceHandle, string parentFile) public IAssemblyMetadata FindAssembly(MetadataReader metadataReader, AssemblyReferenceHandle assemblyReferenceHandle, string parentFile)
{ {

Loading…
Cancel
Save