You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
One-time stack re-ordering step for repeat loops #51
For repeat loops, instead of re-ordering the stack afterwards to be like before, you can instead see what the stack is going to look like at the end of the loop, and order the stack accordingly before the loop.
Ex. if the stack is [a, b, c] before the repeat, and will be [b, a, c] after one loop, instead of going [b, a, c] -> [a, b, c] N times, you can go from [a, b, c] -> [b, a, c] once, before the loop.
A PR is now up for this: #57. It adds a one-time stack re-ordering step when a repeat loop starts, which fixes the stack ordering issue for repeat loops. 🎉
Activity
ControlCplusControlV commentedon Dec 17, 2022
One-time stack re-ordering step for repeat loops
For repeat loops, instead of re-ordering the stack afterwards to be like before, you can instead see what the stack is going to look like at the end of the loop, and order the stack accordingly before the loop.
Ex. if the stack is
[a, b, c]before therepeat, and will be[b, a, c]after one loop, instead of going[b, a, c]->[a, b, c]N times, you can go from[a, b, c]->[b, a, c]once, before the loop.webbrain-one commentedon Aug 21, 2026
A PR is now up for this: #57. It adds a one-time stack re-ordering step when a repeat loop starts, which fixes the stack ordering issue for repeat loops. 🎉