Add R2R helpers for AllocContinuation, AllocContinuationMethod, and AllocContinuationClass.#123975
Merged
jtschuster merged 4 commits intodotnet:mainfrom Feb 6, 2026
Merged
Conversation
Implements change #3 from async methods R2R breakdown. Adds helpers 0x113-0x115 for allocating continuation objects.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Ready-to-Run (R2R) helpers for three new continuation allocation helpers: AllocContinuation, AllocContinuationMethod, and AllocContinuationClass. These helpers are part of the infrastructure for async method support in R2R compiled code.
Changes:
- Added three new R2R helper enum values (0x113-0x115) across C++ and C# codebases
- Added JIT helper mappings to mark these as allocators and heap mutators
- Added entry point resolution to System.Runtime.CompilerServices.AsyncHelpers class
- Minor trailing whitespace cleanup in CorInfoImpl.ReadyToRun.cs
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/inc/readytorun.h | Added C++ enum values for the three new R2R helpers |
| src/coreclr/inc/readytorunhelpers.h | Added helper macro mappings from R2R helpers to CORINFO helpers |
| src/coreclr/jit/utils.cpp | Configured new helpers as allocators that mutate heap |
| src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs | Added C# enum values for the three new R2R helpers |
| src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs | Added entry point resolution to AsyncHelpers methods |
| src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs | Added JIT interface mappings and whitespace cleanup |
| src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/ReadyToRunSignature.cs | Added signature parsing for the new helpers |
src/coreclr/tools/Common/Internal/Runtime/ReadyToRunConstants.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Feb 3, 2026
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/JitHelper.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Feb 3, 2026
ilc doesn't need AllocContinuationMethod/Class Update places that reference the method to use the R2RHelper
This was referenced Feb 4, 2026
jkotas
approved these changes
Feb 6, 2026
lewing
pushed a commit
to lewing/runtime
that referenced
this pull request
Feb 9, 2026
…llocContinuationClass. (dotnet#123975) Add ReadyToRun helpers (0x113–0x115) for AllocContinuation, AllocContinuationMethod, and AllocContinuationClass to support async method continuation allocation in crossgen2/R2R. Update ReadyToRunConstants with the new helper enums and wire them through the JIT/R2R helper tables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add R2R helpers for AllocContinuation, AllocContinuationMethod, and AllocContinuationClass.