-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Move StubHelpers.AsyncCallContinuation to AsyncHelpers. #121458
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
base: main
Are you sure you want to change the base?
Move StubHelpers.AsyncCallContinuation to AsyncHelpers. #121458
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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 moves the AsyncCallContinuation intrinsic from StubHelpers to AsyncHelpers, consolidating async-related functionality in a single location.
- The intrinsic method is relocated from
System.StubHelperstoSystem.Runtime.CompilerServices.AsyncHelpers - Corresponding updates made across VM metadata definitions, JIT intrinsic lists, and JIT importer logic
- Documentation updated to reflect the new location
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/vm/corelib.h | Moved method definition from STUBHELPERS to ASYNC_HELPERS class |
| src/coreclr/jit/namedintrinsiclist.h | Moved intrinsic enum from StubHelpers section to AsyncHelpers section |
| src/coreclr/jit/importercalls.cpp | Updated intrinsic references and lookup logic to use AsyncHelpers |
| src/coreclr/jit/gentree.cpp | Updated comment to reference AsyncHelpers instead of StubHelpers |
| src/coreclr/System.Private.CoreLib/src/System/StubHelpers.cs | Removed AsyncCallContinuation method |
| src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs | Added AsyncCallContinuation method |
src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs
Show resolved
Hide resolved
VSadov
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!
…Services/AsyncHelpers.CoreCLR.cs Co-authored-by: Vladimir Sadov <vsadov@microsoft.com>
src/coreclr/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncHelpers.CoreCLR.cs
Outdated
Show resolved
Hide resolved
…Services/AsyncHelpers.CoreCLR.cs
| DEFINE_METHOD(ASYNC_HELPERS, RESTORE_CONTEXTS, RestoreContexts, NoSig) | ||
| DEFINE_METHOD(ASYNC_HELPERS, CAPTURE_CONTEXTS, CaptureContexts, NoSig) | ||
| DEFINE_METHOD(ASYNC_HELPERS, RESTORE_CONTEXTS, RestoreContexts, NoSig) | ||
| DEFINE_METHOD(ASYNC_HELPERS, ASYNC_CALL_CONTINUATION, AsyncCallContinuation, SM_RetContinuation) |
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.
| DEFINE_METHOD(ASYNC_HELPERS, ASYNC_CALL_CONTINUATION, AsyncCallContinuation, SM_RetContinuation) | |
| DEFINE_METHOD(ASYNC_HELPERS, ASYNC_CALL_CONTINUATION, AsyncCallContinuation, NoSig) |
So that it looks like the other methods.
The signature is only required to disambiguate overloads. Also, delete RetContinuation from metasig.h
| // This is the "magic" method on wich other "Await" methods are built. | ||
| // Calling this from an Async method returns the continuation to the caller thus | ||
| // explicitly initiates suspension. | ||
| [Intrinsic] |
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.
There is a typo (wich -> which) a few lines above
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.
Thanks!
Moves StubHelpers.AsyncCallContinuation to AsyncHelpers so StubHelpers.cs doesn't need to be added to nativeaot.
Thought it would be good to have separate commits for this and the rest of #121456