Skip to content

refactor: address TODOs ExtHandle usage and simplify DslIr Ext field opcodes #2296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Kalpazanova53
Copy link

Motivation

This PR introduces extended support for arithmetic operations in the DSL IR, especially for combinations involving Felt and Ext values. The current implementation lacked direct opcodes such as SubFE, MulFEI, and DivFE, which limited expressiveness and required verbose patterns.

Additionally, this PR adds an ext_handle_ptr to the InnerBuilder to facilitate better contextual access from the FeltOperations, improving modularity across builder logic.

Solution

-Added new IR opcodes to DslIr enum:

SubFE, MulFEI, DivFE, enabling direct mixed-type arithmetic.

-Updated builder.rs logic to generate these IR ops where appropriate.

-Modified InnerBuilder to include ext_handle_ptr, ensuring safe access and consistent context passing for extended operations.

-All related // TODO: comments are now removed.

cargo check

Pasted Graphic 28

cargo build

Pasted Graphic 29

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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.

1 participant