Refactor async calling convention detection to use MethodDesc extension method #121420
+9
−20
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.