Browse Source

Merge pull request #3088 from cshung/public/update-ready-to-run

Update ready to run
pull/3106/head
Christoph Wille 2 years ago committed by GitHub
parent
commit
be9fabb8af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  2. 14
      ILSpy.ReadyToRun/ReadyToRunDisassembler.cs

2
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -38,7 +38,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Iced" Version="1.18.0" /> <PackageReference Include="Iced" Version="1.18.0" />
<PackageReference Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="8.0.0-preview.5.23260.1" /> <PackageReference Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="8.0.0-rc.2.23471.30" />
<!-- ILCompiler.Reflection.ReadyToRun has dependencies on System.Reflection.Metadata and <!-- ILCompiler.Reflection.ReadyToRun has dependencies on System.Reflection.Metadata and
System.Runtime.CompilerServices.Unsafe. Because the AddIn compiles into ILSpy's output System.Runtime.CompilerServices.Unsafe. Because the AddIn compiles into ILSpy's output
directory, we're at risk of overwriting our dependencies with different versions. directory, we're at risk of overwriting our dependencies with different versions.

14
ILSpy.ReadyToRun/ReadyToRunDisassembler.cs

@ -114,10 +114,13 @@ namespace ICSharpCode.ILSpy.ReadyToRun
ulong baseInstrIP = instructions[0].IP; ulong baseInstrIP = instructions[0].IP;
var boundsMap = new Dictionary<uint, uint>(); var boundsMap = new Dictionary<uint, uint>();
foreach (var bound in runtimeFunction.DebugInfo.BoundsList) if (runtimeFunction.DebugInfo != null)
{ {
// ignoring the return value assuming the same key is always mapped to the same value in runtimeFunction.DebugInfo.BoundsList foreach (var bound in runtimeFunction.DebugInfo.BoundsList)
boundsMap.TryAdd(bound.NativeOffset, bound.ILOffset); {
// ignoring the return value assuming the same key is always mapped to the same value in runtimeFunction.DebugInfo.BoundsList
boundsMap.TryAdd(bound.NativeOffset, bound.ILOffset);
}
} }
foreach (var instr in instructions) foreach (var instr in instructions)
@ -141,7 +144,10 @@ namespace ICSharpCode.ILSpy.ReadyToRun
} }
} }
} }
DecorateGCInfo(instr, baseInstrIP, readyToRunMethod.GcInfo); if (ReadyToRunOptions.GetIsShowGCInfo(null))
{
DecorateGCInfo(instr, baseInstrIP, readyToRunMethod.GcInfo);
}
formatter.Format(instr, tempOutput); formatter.Format(instr, tempOutput);
output.Write(instr.IP.ToString("X16")); output.Write(instr.IP.ToString("X16"));
output.Write(" "); output.Write(" ");

Loading…
Cancel
Save