forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Three fixes for R2RDump bugs I discovered while investigating dotnet#…
…38290 (dotnet#41303) 1) As ReadyToRunMethod newly looks at method bodies, in the composite case we need to pass around per-module IL info, not only the metadata reader. I have replaced such usages of MetadataReader with the new interface IAssemblyMetadata and I implemented the standalone variant StandaloneAssemblyMetadata. 2) I hit an UnwindInfo decoding issue and I found out that the UnwindCode decoder is weirdly split between the UnwindCode ctor and a separate method ParseUnwindCode that weren't completely consistent in whether the UnwindInfoArray refers to the raw 16-bit entries in the UnwindInfo or to the parsed UnwindCode instances. I have basically migrated ParseUnwindCode into the UnwindCode ctor and I simplified the related logic. 3) We shouldn't block method dump on header dump, otherwise there's no way to dump both headers and methods in one R2RDump execution. Thanks Tomas
- Loading branch information
Showing
13 changed files
with
240 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/coreclr/src/tools/aot/ILCompiler.Reflection.ReadyToRun/IAssemblyMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Reflection.Metadata; | ||
using System.Reflection.PortableExecutable; | ||
|
||
namespace ILCompiler.Reflection.ReadyToRun | ||
{ | ||
/// <summary> | ||
/// This interface represents MSIL information for a single component assembly. | ||
/// </summary> | ||
public interface IAssemblyMetadata | ||
{ | ||
PEReader ImageReader { get; } | ||
|
||
MetadataReader MetadataReader { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.