Refactor async calling convention detection to use MethodDesc extension method#121420
Merged
MichalStrehovsky merged 3 commits intoMichalStrehovsky-patch-1from Nov 6, 2025
Merged
Conversation
…ethod Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Co-authored-by: MichalStrehovsky <13110571+MichalStrehovsky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Report CALLCONV_ASYNCCALL and FLAG_ASYNC on AsyncExplicitImpl methods
Refactor async calling convention detection to use MethodDesc extension method
Nov 6, 2025
MichalStrehovsky
approved these changes
Nov 6, 2025
Member
MichalStrehovsky
left a comment
There was a problem hiding this comment.
If it complies, looks good.
Member
|
/ba-g looks like the runtime pipeline doesn't run for PRs into developer branches. Going to merge so it runs in my PR. |
142bd45
into
MichalStrehovsky-patch-1
13 of 14 checks passed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Consolidates async calling convention detection logic into a single
MethodDescextension method, removing the need forMethodSignatureFlags.AsyncCallflag.Changes:
IsAsyncCallextension method onMethodDescthat unifies detection logic: returns true for async variants and async intrinsics that don't return Task/ValueTaskMethodSignatureFlags.AsyncCallenum value andMethodSignature.IsAsyncCallpropertyCorInfoImpl.csto use the new extension method forCORINFO_CALLCONV_ASYNCCALLandCORJIT_FLAG_ASYNCAsyncMethodVariantto no longer set the AsyncCall flag in signatureRationale:
Async calling convention is now determined at the MethodDesc level (similar to hidden parameters in generic calling conventions) rather than being stored in signature flags. This properly handles both async variants (which have the flag set by signature transformation) and async intrinsics (which have
IsAsyncmetadata but don't return Task/ValueTask).✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.