Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

@MichalStrehovsky MichalStrehovsky commented Nov 10, 2025

A couple fixes for things I ran into as I work on generic virtual method support with runtime async.

Cc @dotnet/ilc-contrib

A couple fixes for things I ran into as I work on generic virtual method support with runtime async.
Copilot AI review requested due to automatic review settings November 10, 2025 12:35
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for handling generic instantiations of async methods in the AOT compilation pipeline. The changes enable async resumption stubs and async method variants to correctly handle type and method generic parameters.

Key changes:

  • Updated token kind checking to support the CORINFO_TOKENKIND_Await flag which is a composite flag
  • Added Instantiation property to AsyncResumptionStub to support generic methods
  • Implemented proper instantiation handling for async resumption stubs with generic type and method parameters
  • Created AsyncEcmaMethodIL wrapper to correctly associate IL with async method variants

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
CorInfoImpl.RyuJit.cs Changed Debug.Assert to use bitwise AND check for composite CORINFO_TOKENKIND_Await flag
AsyncResumptionStub.cs Added Instantiation property override to expose owning method's generic parameters
NativeAotILProvider.cs Added AsyncEcmaMethodIL wrapper class to correctly associate IL with async variant method
CorInfoImpl.cs Added token type check for async await, and implemented proper instantiation handling for async resumption stubs

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichalStrehovsky
Copy link
Member Author

/ba-g android timeouts are known

@MichalStrehovsky MichalStrehovsky merged commit 83496bf into dotnet:main Nov 11, 2025
87 of 96 checks passed
@MichalStrehovsky MichalStrehovsky deleted the genfixes branch November 11, 2025 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants