[mlir][Sol] Emit debug revert strings in the dispatcher guard reverts - #128
Merged
Conversation
This was referenced Jul 24, 2026
Merged
abinavpp
marked this pull request as ready for review
July 25, 2026 13:55
There was a problem hiding this comment.
Pull request overview
This PR adds compiler-generated debug revert strings for dispatcher guard reverts during Sol-to-Yul lowering, improving debuggability when calls revert due to non-payable value transfers or missing fallback/receive handling.
Changes:
- Emit a debug revert string when Ether is sent to a non-payable function (instead of a bare revert).
- Emit a debug revert string when no fallback exists (distinguishing whether
receive()exists). - Add an unconditional
genDebugRevertWithMsg(std::string, Location)overload to the EVM builder.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| mlir/lib/Conversion/SolToYul/SolToYul.cpp | Switch dispatcher guard reverts to use debug revert messages for clearer failure reasons. |
| mlir/lib/Conversion/SolToYul/EVMUtil.cpp | Add unconditional debug-revert-with-message helper that falls back to plain revert when disabled. |
| mlir/include/mlir/Conversion/SolToYul/EVMUtil.h | Declare the new unconditional genDebugRevertWithMsg overload in the builder API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
from
July 27, 2026 18:45
9774d16 to
d771ff5
Compare
abinavpp
force-pushed
the
app-lowering-sem-fixes
branch
2 times, most recently
from
July 27, 2026 19:03
5d9e222 to
98884a4
Compare
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
from
July 27, 2026 19:03
d771ff5 to
4d32b12
Compare
abinavpp
force-pushed
the
app-lowering-sem-fixes
branch
from
July 28, 2026 12:45
98884a4 to
384e1d7
Compare
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
from
July 28, 2026 12:45
4d32b12 to
1f62640
Compare
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
5 times, most recently
from
July 28, 2026 12:54
f7c69fc to
5b8b157
Compare
abinavpp
force-pushed
the
app-dispatcher-revert-strings
branch
from
July 28, 2026 12:55
5b8b157 to
8f57970
Compare
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.
NomicFoundation/solx-solidity#168