Uh oh!
There was an error while loading. Please reload this page.
[mono][wasm] Allow methods with finally clauses to be AOTed. - #63065
Merged
Conversation
vargaz
requested review from
BrzVlad, EgorBo, SamMonoRT, imhameed, lambdageek, marek-safar and thaystg
as code ownersDecember 22, 2021 08:26
ghost
commented
Dec 22, 2021
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. |
vargaz
commented
Dec 22, 2021
ContributorAuthor
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
EgorBo
commented
Dec 22, 2021
Member
vargaz
commented
Dec 22, 2021
ContributorAuthor
This PR only runs finally blocks with the interpreter during exception handling, the normal case runs them using AOT. |
vargaz
commented
Dec 26, 2021
ContributorAuthor
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Dec 26, 2021
ContributorAuthor
The remaining WASM failures all look like an OOM while AOTing Microsoft.CodeAnalysis.CSharp.dll. |
vargaz
commented
Dec 28, 2021
ContributorAuthor
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Jan 1, 2022
ContributorAuthor
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargazforce-pushed
the
deopt2
branch
2 times, most recently
from
January 1, 2022 16:44
b537b76 to
bfc524bCompareThis 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.
vargaz
commented
Jan 2, 2022
ContributorAuthor
/azp run runtime-manual |
|
Azure Pipelines successfully started running 1 pipeline(s). |
vargaz
commented
Jan 2, 2022
ContributorAuthor
Failures are unrelated. |
BrzVlad
approved these changes
Jan 3, 2022
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

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.