-
Notifications
You must be signed in to change notification settings - Fork 0
Emit async methods #5
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?
Conversation
…necessary methods
…c thunks to be inlined.
…nCodegenCompilation.cs Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
- Clear ClassTokenOrOffset when setting R2R_SYSTEM_EXCEPTION flag - Add COR_ILEXCEPTION_CLAUSE_R2R_SYSTEM_EXCEPTION to R2R dumper
Encode Continuation types in R2R images using a new fixup kind (READYTORUN_FIXUP_Continuation_Layout = 0x37): - Include OwningMethod to associate the Continuation type with the correct loader allocator at runtime - Encode the GC ref map as a bit vector expanded to a byte array - Add AsyncContinuationLayoutAlgorithm for field layout computation Add runtime support to read continuation type fixups from R2R images: - GetContinuationTypeFromLayout decodes the blob and creates the type - LoadDynamicInfoEntry handles the new fixup kind Also adds helper constants for future continuation allocation helpers. Note: These code paths are not yet exercised as async2 methods are not currently compiled to ReadyToRun images.
…g unneeded method parameters and simplifying type resolution logic.
|
Made a new PR to target the dotnet repo: dotnet#123643 |
…r loader allocation
|
|
||
| foreach (MethodWithGCInfo method in _nodeFactory.EnumerateCompiledMethods()) | ||
| { | ||
| if (method.Method is AsyncResumptionStub) |
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.
This feels like incorrect code for now, I expect we need to be able to catch here. However, this change is already REALLY BIG. I'd prefer to see us get checked in with a set of known bugs, and iterate, than keep growing this change ever larger. I'd like a to see a bug filed about it before checkin, but its not that critical to me.
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.
And if this is a temporary state, a ASYNC_R2R_TODO comment might be good to find these sorts of things in the codebase.
| EcmaMethod inlinerDefinition = (EcmaMethod)inliner.GetTypicalMethodDefinition(); | ||
| if (inliner.IsAsyncThunk()) | ||
| { | ||
| // Async thunks are generated by crossgen and diagnostic tools don't need to worry about them |
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.
And ASYNC_R2R_TODO, verify this assumption comment probably needs to be here. We can verify after this is merged.
| } | ||
|
|
||
| if (callee.IsAsyncThunk()) | ||
| if (callee.IsAsyncThunk() || callee.IsAsyncCall() || caller.IsAsyncThunk() || caller.IsAsyncCall()) |
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.
This needs a ASYNC_R2R_TODO. In general async methods should be able to inline stuff. However, again, we should target getting this all merged, and then fixing the places where we've made suboptimal decisions.
No description provided.