Skip to content

[RuntimeAsync] Move runtime async to the main repo #113976

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

Closed
wants to merge 221 commits into from
Closed

Conversation

VSadov
Copy link
Member

@VSadov VSadov commented Mar 27, 2025

Do not review just yet. May need some work.

A list of things to address. Some of these may be more relevant to address separately later.

Required before merge:

  • Resolve build issues.
  • Resolve test failures in existing tests
  • Asses the performance impact from the presence of the feature.
  • Make sure no new GC Stress failures.
  • Restore CODEOWNERS
  • Determine what to do about CompatibilitySuppressions
  • Decide whether we want a feature ifdef and merge this disabled, or whether we can do the work upfront to merge it enabled
  • Ensure new files have license headers
  • (JIT) Add function headers on new functions
  • Make sure crossgen2/ilc do not blow up on async2 methods
  • Undo NativeCodeVersion/NativeCodeVersionNode/PrepareCodeConfig slot changes (not used in the end)
  • Undo codeman.cpp white space change
  • Figure out if eetwain.cpp change should be undone
  • Figure out if gcinfodecoder.cpp change should be undone
  • Remove auto in ClassifyAsyncMethodSignatureCore
  • Add proper contracts and declarations for jitinterface.cpp methods for building resumption stubs
  • Delete restoreregs_for_runtimesuspension.h
  • Address stack underflow changes in stubgen.cpp
  • Remove added ILCodeStream::EmitUNBOX if it is unused
  • Undo QCallHandles.cs change
  • Decide whether meaningful names of getAsyncResumptionStub should be debug-only
  • Decide if we should keep performance measurements in design doc
  • Find and replace all instances of "async2" with "runtime async", or just "async" when it is clear that it is runtime async

Clean ups that are potentially not necessary for this PR (but some of these may be nice-to-have before review):

  • (VM) Unify new OSR overload with existing overload
  • (JIT/VM) Decide whether to remove new CORINFO_HELP_THROWEXACT in favor of using ExceptionDispatchInfo
  • (JIT) Split up async2 transformation into smaller documented parts
  • (JIT) Replace GenTreeCall::gtIsAsyncCall with a flag or calling convention change
  • (JIT) Best-effort LA64/RISCV64 support
  • (JIT/VM) Remove the "StructMethodThatOperatesOnCopy" mechanism (in favor of Roslyn-created copy)
  • (JIT) Remove unnecessary intrinsic recognitions from special await helpers and get_RuntimeAsyncViaJitGeneratedStateMachines
  • (VM) Rewrite MethodTableNative::GetLoaderAllocatorHandle in managed code
  • (VM) Decide whether async thunks should be allowed to tier
  • (VM) Optimize MethodTable::GetParallelMethodDesc

davidwrighton and others added 30 commits November 16, 2023 14:23
…actually write some "async" and start breaking things again
… and see if suspension works

NOTE: No methods with generic parameters will work with the current implementation, generics may require a bunch of infrastructure work, separate from the async work
- Public apis for directly awaiting from async2 code
- Update test case to use the new apis and now the code is lovely and simple
…ils into doc, but managed code may have the right logic :)
…ably in the presence of Suspend operations, but other stuff seems to work. Now to rework Task generation to avoid multithreaded races
remove DEFINE_METHOD for no longer existing methods
@jkotas
Copy link
Member

jkotas commented Apr 7, 2025

hide async2 variants from reflection

Find and replace all instances of "async2" with "runtime async", or just "async" when it is clear that it is runtime async?

@VSadov
Copy link
Member Author

VSadov commented Apr 7, 2025

Find and replace all instances of "async2" with "runtime async", or just "async" when it is clear that it is runtime async?

I am considering that. The 2 in async2 is not very meaningful at runtime level, since there is only one kind of async.
We have cleaned JIT from 2, somewhat, already.

It is just a mostly mechanical change that is further on the list of things to do.

@VSadov
Copy link
Member Author

VSadov commented Apr 28, 2025

I will close this now since we have #114675 and #114861

@VSadov VSadov closed this Apr 28, 2025
@VSadov VSadov deleted the a2move branch April 28, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-api-needs-documentation NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) runtime-async runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants