miden-vm icon indicating copy to clipboard operation
miden-vm copied to clipboard

Allow repeat opcode to be set programmatically

Open partylikeits1983 opened this issue 9 months ago • 3 comments

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 avatar May 03 '24 17:05 partylikeits1983