Skip to content
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

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

Draft
wants to merge 184 commits into
base: main
Choose a base branch
from

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
  • Make zapsig.cpp bool consistent with surrounding code
  • Undo QCallHandles.cs change
  • Decide whether meaningful names of getAsyncResumptionStub should be debug-only

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

  • (JIT) Remove support for capture-by-value for this in structs. Maybe ok to just have an assert/failfast instead, for now.
  • (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
@VSadov VSadov force-pushed the a2move branch 2 times, most recently from 885a2f4 to 650a7bb Compare March 31, 2025 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants