summaryrefslogtreecommitdiff
path: root/src/s2wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r--src/s2wasm.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 5226ceda3..8c04f7891 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -1064,7 +1064,7 @@ class S2WasmBuilder {
if (target->is<Block>()) {
return target->cast<Block>()->name;
} else {
- return target->cast<Loop>()->in;
+ return target->cast<Loop>()->name;
}
};
// fixups
@@ -1099,10 +1099,9 @@ class S2WasmBuilder {
} else if (match("loop")) {
auto curr = allocator->alloc<Loop>();
addToBlock(curr);
- curr->in = getNextLabel();
- curr->out = getNextLabel();
+ curr->name = getNextLabel();
auto block = allocator->alloc<Block>();
- block->name = curr->out; // temporary, fake - this way, on bstack we have the right label at the right offset for a br
+ block->name = getNextLabel();
curr->body = block;
loopBlocks.push_back(block);
bstack.push_back(block);