Skip to content

missing implementation for static primus lisp semantics while loop #1623

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

Open
ivg opened this issue Mar 21, 2025 · 0 comments
Open

missing implementation for static primus lisp semantics while loop #1623

ivg opened this issue Mar 21, 2025 · 0 comments

Comments

@ivg
Copy link
Member

ivg commented Mar 21, 2025

When a while loop has statically known condition (i.e., when it should be unfolded into a static value) the loop side effects are not reified. Only the resulting value or nothing at all if there is no value. E.g.,

(while len
  (set x 0)
  (decr len))

should be reified to

x := 0
x := 0
...

len times for statically known len, but it is turned into nothing.

Note, that for an expression that construct pure value it works correctly (though any side effects are not observable).

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

No branches or pull requests

1 participant