Skip to content

Stop exploration from interface when call on constrained generic static virtual - #137568

Open
manofstick wants to merge 1 commit into
dotnet:mainfrom
manofstick:generic-static-virtual-calls-on-the-constraint-type-only
Open

manofstick wants to merge 1 commit into
dotnet:mainfrom
manofstick:generic-static-virtual-calls-on-the-constraint-type-only

Conversation

@manofstick

Copy link
Copy Markdown
Contributor

Constrained call to a generic static virtual method from shared code resolves to only against the constraint type's own implementation, instead of against every constructed implementer of the interface.

Whilst working on getting AOT compiling for Cistern.ValueLinq going, I was getting extreme blowout of time, one reason of which was due to additional exploration of surface in the case of constrained calls to generic static virtual methods and so this PR limits the exploration for that particular case. (The other major blow out was on .net11 release, but #135943 fixes it - I had a > 2000s fold, coming down to < 10s).

Dead code elimination tests added

…resolves to only against the constraint type's own implementation,

instead of against every constructed implementer of the interface.
@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Nov 15, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants