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

Support do-while loop fully #122

Open
SerVB opened this issue Mar 25, 2022 · 0 comments
Open

Support do-while loop fully #122

SerVB opened this issue Mar 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@SerVB
Copy link
Collaborator

SerVB commented Mar 25, 2022

Now continue is unsupported. Probably we can support it by compiling do { <body> } while (<condition>) as follows:

firstIterationLoopName = true
while firstIterationLoopName or (<condition>):
    firstIterationLoopName = false
    <body>

We need to introduce loop name, but there is already some logic for it in PyGenerationContext – we can pick the missing parts inside js-ir. Or we could use a concept of tmpVariable, this can be even easier.

@SerVB SerVB added the bug Something isn't working label Mar 25, 2022
@SerVB SerVB self-assigned this Apr 29, 2022
SerVB added a commit that referenced this issue Apr 29, 2022
This resolves #122. However, I suspect in the future we will need to
adjust BlockDecomposerLowering because it does some modifications to
loops that can be unsupported in Python
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant