summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 8b6aabeb7..abfb4a92d 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -946,16 +946,7 @@ class S2WasmBuilder {
curr->type = curr->value->type;
setOutput(curr, assign);
} else if (match("return")) {
- Block *temp;
- if (!(func->body && (temp = func->body->dyn_cast<Block>()) && temp->name == FAKE_RETURN)) {
- Expression* old = func->body;
- temp = allocator.alloc<Block>();
- temp->name = FAKE_RETURN;
- if (old) temp->list.push_back(old);
- func->body = temp;
- }
- auto curr = allocator.alloc<Break>();
- curr->name = FAKE_RETURN;
+ auto curr = allocator.alloc<Return>();
if (*s == '$') {
curr->value = getInput();
}