Browse Source

Update ready to run

pull/3088/head
Andrew Au 2 years ago
parent
commit
f4af00a8f9
  1. 2
      ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj
  2. 14
      ILSpy.ReadyToRun/ReadyToRunDisassembler.cs

2
ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj

@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
<ItemGroup>
<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
System.Runtime.CompilerServices.Unsafe. Because the AddIn compiles into ILSpy's output
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 @@ -114,10 +114,13 @@ namespace ICSharpCode.ILSpy.ReadyToRun
ulong baseInstrIP = instructions[0].IP;
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
boundsMap.TryAdd(bound.NativeOffset, bound.ILOffset);
foreach (var bound in runtimeFunction.DebugInfo.BoundsList)
{
// 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)
@ -141,7 +144,10 @@ namespace ICSharpCode.ILSpy.ReadyToRun @@ -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);
output.Write(instr.IP.ToString("X16"));
output.Write(" ");

Loading…
Cancel
Save