-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[mono][wasm] Allow methods with finally clauses to be AOTed. #63065
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
This PR only runs finally blocks with the interpreter during exception handling, the normal case runs them using AOT. |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
The remaining WASM failures all look like an OOM while AOTing Microsoft.CodeAnalysis.CSharp.dll. |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
b537b76
to
bfc524b
Compare
This is implemented by running the finally clause with the interpreter. Methods with clauses have additional code generated, which: * Saves the IL state (pc+arguments+locals) into a MonoMethodILState structure. * Pushes an LMF frame on the LMF stack of type MONO_LMFEXT_IL_STATE. The LMF frame points to the il state. During EH, if such an LMF frame is found, and the IL pc in the il state points inside a clause, then an interpreted version of the method is created, and the finally clause is ran using the interpreter using the il state as the starting state.
/azp run runtime-manual |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures are unrelated. |
This is implemented by running the finally clause with the interpreter.
Methods with clauses have additional code generated, which:
structure.
The LMF frame points to the il state.
During EH, if such an LMF frame is found, and the IL pc in the
il state points inside a clause, then an interpreted version
of the method is created, and the finally clause is ran using
the interpreter using the il state as the starting state.