[compiler] Overload Move abort to support messages#18403
Merged
Conversation
22 tasks
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
e16c548 to
9d97287
Compare
vineethk
reviewed
Jan 6, 2026
Contributor
vineethk
left a comment
There was a problem hiding this comment.
Left some higher level syntax questions in slack. Leaving some comments here too.
third_party/move/move-compiler-v2/transactional-tests/tests/control_flow/abort_msg.move
Outdated
Show resolved
Hide resolved
third_party/move/move-compiler-v2/transactional-tests/tests/control_flow/abort_msg.exp
Outdated
Show resolved
Hide resolved
third_party/move/move-compiler-v2/transactional-tests/tests/control_flow/abort_byte_string.exp
Show resolved
Hide resolved
8e1d7bf to
aec15df
Compare
vineethk
approved these changes
Jan 7, 2026
Contributor
vineethk
left a comment
There was a problem hiding this comment.
Approving assuming comments are addressed. Looks good!
22 tasks
junxzm1990
reviewed
Jan 8, 2026
junxzm1990
reviewed
Jan 8, 2026
junxzm1990
reviewed
Jan 8, 2026
junxzm1990
reviewed
Jan 8, 2026
junxzm1990
approved these changes
Jan 8, 2026
Contributor
junxzm1990
left a comment
There was a problem hiding this comment.
Approving with some minor comments, assuming they will be looked at.
7c56a57 to
bfd3c95
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
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.

Description
This extends the Move abort syntax by overloading it to accept either a
u64or avector<u8>, e.g.The latter form emits a
AbortMsginstruction withUNSPECIFIED_ABORT_CODEand the provided message.How Has This Been Tested?
Added several tests in
move-compiler-v2-transactional-tests, such as:abort b"Hello, world!")abort vector[..])Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist
Note
Introduces message-carrying aborts and aligns tooling/bytecode defaults accordingly.
AbortKindand replacesOperation::Abort/AbortMsgwith unifiedOperation::Abort(AbortKind)across AST, rewriters, visitors, lints, and sourcifierAbort(code, [message]); astifier and analyzers updated to treatAbort(..)as a terminator/control-flow redirectabortto acceptu64orvector<u8>(impliesUNSPECIFIED_ABORT_CODE), with improved diagnostics for unsupported types; enabled in language version ≥ 2.4VERSION_DEFAULT_LANG_V2_4toVERSION_10(bytecode includesABORT_MSG)abortwith byte string/vector/block/complex/nested and invalid UTF-8; adjusts expected error messages and baselines; adds round-trip decompiled casesOperation::Abort(…);tests.rsmarks new separate baselinesWritten by Cursor Bugbot for commit bfd3c95. This will update automatically on new commits. Configure here.