Skip to content

feat: add comptime support for modulus_* compiler builtins#5530

Merged
TomAFrench merged 7 commits intomasterfrom
tf/comptime-bn254-check
Jul 17, 2024
Merged

feat: add comptime support for modulus_* compiler builtins#5530
TomAFrench merged 7 commits intomasterfrom
tf/comptime-bn254-check

Conversation

@TomAFrench
Copy link
Copy Markdown
Member

Description

Problem*

Resolves

Summary*

This PR changes the function std::compat::is_bn254 to run in a comptime context. To do this I've had to implement a few compiler builtins within the interpreter.

I've had to mangle std::compat::is_bn254 a bit to get around restrictions on when a function can be called in a comptime context however.

This works around around the loop unrolling issue experienced in #4535.

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Loading
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.

2 participants