-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Fixes for generics and shared generics #121494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
A couple fixes for things I ran into as I work on generic virtual method support with runtime async.
src/coreclr/tools/Common/TypeSystem/IL/Stubs/AsyncResumptionStub.cs
Outdated
Show resolved
Hide resolved
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
There was a problem hiding this 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_Awaitflag which is a composite flag - Added
Instantiationproperty toAsyncResumptionStubto support generic methods - Implemented proper instantiation handling for async resumption stubs with generic type and method parameters
- Created
AsyncEcmaMethodILwrapper 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 |
jkotas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/coreclr/tools/Common/TypeSystem/IL/Stubs/AsyncResumptionStub.cs
Outdated
Show resolved
Hide resolved
|
/ba-g android timeouts are known |
A couple fixes for things I ran into as I work on generic virtual method support with runtime async.
Cc @dotnet/ilc-contrib