Fix resolving of default interface methods in crossgen2#126351
Open
BrzVlad wants to merge 1 commit intodotnet:mainfrom
Open
Fix resolving of default interface methods in crossgen2#126351BrzVlad wants to merge 1 commit intodotnet:mainfrom
BrzVlad wants to merge 1 commit intodotnet:mainfrom
Conversation
When doing a static virtual call, we would only lookup implementations on the constrained type. If this resolution fails, we add the fallback of looking for DIMs on the implemented interfaces. Makes Perf_DateTimeCultureInfo.ToString tests 25x faster when having only interpreter fallback
Contributor
There was a problem hiding this comment.
Pull request overview
Improves crossgen2 handling of constrained static virtual interface calls by adding a fallback to resolve default interface method (DIM) implementations when no concrete implementation is found on the constrained type.
Changes:
- Add DIM fallback resolution for static virtual calls when type-based resolution fails.
- Relax a debug assertion to allow resolved targets whose owning type is an interface when the target is a static DIM.
src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs
Show resolved
Hide resolved
11 tasks
This was referenced Mar 31, 2026
Open
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When doing a static virtual call, we would only lookup implementations on the constrained type. If this resolution fails, we add the fallback of looking for DIMs on the implemented interfaces.
Makes Perf_DateTimeCultureInfo.ToString tests 25x faster when having only interpreter fallback