Support while.exec.<proc> to ease loop maitenance
Open
assembly
- Dominant language
- Rust
- Stars
- 772
- Forks
- 352
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 93
Description
A common while pattern is to write:
```
while.true
...
end
```
This causes a bit of duplication, since the same test has to be replicated prior to the while, and as the last thing in the loop. This proposes extending the `while.true` syntax to also support `while.exec.`. The syntax would expand to the pattern above.
Example usage:
```
proc.is_not_zero
dup.0 neq.0
end
begin
push.5
while.exec.is_not_zero
sub.1
end
end
```
Contributor guide
Assessment
This issue has not been assessed yet.