Skip to content

[mlir] Complete try/catch: fallback bytes clause and new-expression#135

Merged
abinavpp merged 3 commits into
mainfrom
app-trycatch-fallback-clause
Jun 2, 2026
Merged

[mlir] Complete try/catch: fallback bytes clause and new-expression#135
abinavpp merged 3 commits into
mainfrom
app-trycatch-fallback-clause

Conversation

@abinavpp

@abinavpp abinavpp commented May 27, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes MLIR frontend support for more try/catch forms in Solidity codegen, especially external calls with varying return arity, fallback bytes bindings, and try new Contract(...).

Changes:

  • Extracts external-call lowering into reusable helpers that expose both status and result values.
  • Adds tryCall propagation and success-status derivation for contract creation.
  • Adds fallback-clause parameter binding and updates lit/semantic failure expectations.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
libsolidity/codegen/mlir/SolidityToMLIR.cpp Refactors external-call lowering and extends try/catch handling for creation and fallback data.
test/lit/mlirCodegen/try.sol Adds init-MLIR coverage for try new Other().
test/lit/mlirCodegen/EVM/try.sol Adds EVM-lowered MLIR coverage for try new Other().
test/mlirSemtestFailures.txt Removes semantic tests now expected to pass.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@abinavpp abinavpp force-pushed the app-trycatch-fallback-clause branch from 5f6c0a1 to a6c6807 Compare May 27, 2026 12:26
@abinavpp abinavpp requested a review from Copilot May 27, 2026 12:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread libsolidity/codegen/mlir/SolidityToMLIR.cpp Outdated
@abinavpp abinavpp force-pushed the app-trycatch-fallback-clause branch from a6c6807 to 34818bb Compare May 28, 2026 06:41
@abinavpp abinavpp marked this pull request as ready for review May 28, 2026 06:49
@abinavpp abinavpp force-pushed the app-trycatch-fallback-clause branch from 34818bb to 5549c50 Compare May 28, 2026 06:50

@PavelKopyl PavelKopyl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread test/lit/mlirCodegen/try.sol
@abinavpp abinavpp force-pushed the app-trycatch-fallback-clause branch from 5549c50 to b1485ab Compare June 1, 2026 13:53
@abinavpp abinavpp force-pushed the app-trycatch-fallback-clause branch from b1485ab to cbccdc7 Compare June 1, 2026 15:49
@abinavpp abinavpp merged commit 69d5af4 into main Jun 2, 2026
2 checks passed
@abinavpp abinavpp deleted the app-trycatch-fallback-clause branch June 2, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants