Closed DenialAdams closed 1 year ago
Whoops, this is more complicated than I remembered because when we "continue" we still need to increment the counter.
The lowering is still possible, just needs to take that into account
If we do this, can also remove a block in wasm backend
Seems like this should be possible now that we have defer.
for i in 1..10 {
...;
}
becomes
let i = 1; // (but in right scope)
loop {
if i >= 10 {
break;
}
defer i = i + 1;
...
}
however, we can't currently defer statements
We can now defer assignment statements, so this lowering should be possible
Oh, we do this now
should become (roughly)