Uh oh!
There was an error while loading. Please reload this page.
Add AsyncMethodDesc to managed type system - #120858
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for async calling convention methods to the managed type system by introducing AsyncMethodDesc, a wrapper type that transforms Task/ValueTask-returning methods into their async-callconv variants. The implementation follows the pattern established by UnboxingMethodDesc for handling multiple method descriptors per method definition.
- Adds
AsyncMethodDescclass to wrap Task/ValueTask methods with async calling convention semantics - Introduces factory pattern for creating and caching async method descriptors
- Extends method signature system to support async calling convention flag
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
AsyncMethodDescFactory.cs | Factory class for creating and caching AsyncMethodDesc instances |
ILCompiler.ReadyToRun.csproj | Project file updates to include new AsyncMethodDesc files |
MethodDesc.cs | Adds AsyncCallConv flag to method signature system |
AsyncMethodDesc.cs | Core implementation of async method descriptor wrapper |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
LGTM.Thanks! |
Adds an AsyncMethodDesc type to represent the runtime-async calling convention methods. The type was modeled after UnboxingMethodDesc, which also has multiple MethodDescs for each method def. These methods override the Signature to add the CallConvAsync flag and change the return type to void (for Task and ValueTask) or T (for Task and ValueTask).