Skip to content
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

Allow repeat opcode to be set programmatically #1324

Open
partylikeits1983 opened this issue May 3, 2024 · 1 comment
Open

Allow repeat opcode to be set programmatically #1324

partylikeits1983 opened this issue May 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@partylikeits1983
Copy link
Contributor

partylikeits1983 commented May 3, 2024

Feature description

Currently the repeat opcode in miden assembly requires the developer to specify the number of loop iterations:

repeat.5
    # 5 loop iterations
end

However, it would be extremely useful to allow the number of loop iterations to be set programmatically. For example:

push.5
repeat
     # 5 loop iterations
end

Why is this feature needed?

I know that there is a while opcode where a similar functionality could be achieved, however, allowing the repeat opcode to be set programmatically would be useful.

@partylikeits1983 partylikeits1983 added the enhancement New feature or request label May 3, 2024
@bobbinth bobbinth transferred this issue from 0xPolygonMiden/miden-base May 3, 2024
@bobbinth
Copy link
Contributor

bobbinth commented May 3, 2024

Interesting! I think what will need to happen is that the assembler will need to transform this into a while loop under the hood. Not sure yet how easy it would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants