Browse Source

[ILSpy.ReadyToRun] Avoid eager parsing

pull/1934/head
Andrew Au 5 years ago
parent
commit
529b004ea9
  1. 2
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  2. 7
      ILSpy.ReadyToRun/ReadyToRunLanguage.cs

2
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -57,7 +57,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Iced" Version="1.4.0" /> <PackageReference Include="Iced" Version="1.4.0" />
<PackageReference Include="ILCompiler.Reflection.ReadyToRun" Version="1.0.4-alpha" /> <PackageReference Include="ILCompiler.Reflection.ReadyToRun" Version="1.0.5-alpha" />
</ItemGroup> </ItemGroup>
<Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" /> <Import Sdk="Microsoft.NET.Sdk" Project="Sdk.targets" />

7
ILSpy.ReadyToRun/ReadyToRunLanguage.cs

@ -175,6 +175,13 @@ namespace ICSharpCode.ILSpy.ReadyToRun
LoadedAssembly loadedAssembly = this.loadedAssembly.LookupReferencedAssembly(new Decompiler.Metadata.AssemblyReference(metadataReader, assemblyReferenceHandle)); LoadedAssembly loadedAssembly = this.loadedAssembly.LookupReferencedAssembly(new Decompiler.Metadata.AssemblyReference(metadataReader, assemblyReferenceHandle));
return loadedAssembly?.GetPEFileOrNull()?.Metadata; return loadedAssembly?.GetPEFileOrNull()?.Metadata;
} }
public MetadataReader FindAssembly(string simpleName, string parentFile)
{
// This is called only for the composite R2R scenario,
// So it will never be called before the feature is released.
throw new NotSupportedException("Composite R2R format is not currently supported");
}
} }
private class ReadyToRunReaderCacheEntry private class ReadyToRunReaderCacheEntry

Loading…
Cancel
Save