Uh oh!
There was an error while loading. Please reload this page.
[RuntimeAsync] ilasm/ildasm support for the MethodImpl.Async - #115332
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request adds support for the "async" method implementation attribute to both ilasm and ildasm, in accordance with the RuntimeAsync specification. The changes include:
- In il_kywd.h, a new keyword "async" is declared.
- In dasm.cpp, the disassembler now checks for the async attribute and prints " async" in the output.
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/coreclr/inc/il_kywd.h | Added the "async" keyword definition to support async methods. |
| src/coreclr/ildasm/dasm.cpp | Updated method dump logic to include "async" when the attribute is active. |
Files not reviewed (2)
- src/coreclr/ilasm/asmparse.y: Language not supported
- src/coreclr/ilasm/prebuilt/asmparse.grammar: Language not supported
huoyaoyuan
commented
May 6, 2025
Does ilasm do this sort of check? |
I don't think so. We don't have any of such check in ilasm, and it just emits whatever you write. |
jkotas
commented
May 6, 2025
Right, it is a by-design feature that ilasm can produce invalid IL. |
VSadov
commented
May 13, 2025
This looks like a fairly mechanical change. I am not very familiar with ilasm/ildasm, but supporting I am wondering - are there any tests for ilasm/ildasm? |
hez2010
commented
May 13, 2025
almost no. the only ilasm test in https://github.com/dotnet/runtime/tree/main/src/tests/ilasm is to test |
jkotas
commented
May 13, 2025
We test ilasm/ildasm by roundtripping all runtime test binaries through ildasm/ilasm, and verifying that the result still works. So the test coverage for this will come online as side-effect of having any tests for async. |
jkotas
commented
May 15, 2025
This introduced regression dotnet/dotnet#544 (comment) that is breaking the dotnet/dotnet build. Reverting in #115621 until we figure out what to do about this. |
hez2010
commented
May 15, 2025
Seems that we cannot make |
VSadov
commented
May 15, 2025
I wonder if we could just treat it as numerical value if ilasm can take methodimpl as a number. |
Implementing ilasm and ildasm support for RuntimeAsync following the spec.
Closes#115093
cc: @VSadov