-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Look through async thunks in RuntimeHelpers.PrepareMethod
#123838
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
This function should JIT the method that has the user IL.
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
Updates CoreCLR’s ReflectionInvocation_PrepareMethod path to avoid JIT-preparing runtime async thunk methods, and instead prepare the associated variant that owns the user IL.
Changes:
- Detect async thunk
MethodDescs inPrepareMethodHelper. - Redirect preparation to the async variant via
GetAsyncVariant()prior to prestub/JIT.
RuntimeHelpers.PrepareMethodRuntimeHelpers.PrepareMethod
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
This function should JIT the method that has the user IL. For runtime async functions reflection exposes the Task-returning variant which is normally a thunk, so treat these transparently.