Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Conversation

@VZout
Copy link
Member

@VZout VZout commented Oct 22, 2020

The "loop detection" I used was wrong in the case of nested if statements.
With this fix you can write nested if statements in rust-gpu.

@VZout VZout requested a review from khyperia October 22, 2020 10:05

// Find conditional branch
for (bi, block) in blocks.iter().enumerate() {
if block_is_loop(blocks, block.label_id().unwrap()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the runtime of this is terrifying, but it's fine as a quick hack, ship it :D

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@VZout VZout merged commit a121e50 into main Oct 22, 2020
@VZout VZout deleted the nested_if_fix branch October 22, 2020 11:29
repi pushed a commit that referenced this pull request Oct 23, 2020
* Fixed nested if statements

* feedback

* Removed a line
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants