summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2016-05-19 17:05:58 -0700
committerDan Gohman <sunfish@mozilla.com>2016-05-19 17:05:58 -0700
commit373cfe3a4364d657b04ea9c35e84324e9edec097 (patch)
tree31d5b392aab63be53f202e57aaca3ef098e3dc44 /src
parente396635727ca7fd571aa4fd19ba310942767307e (diff)
downloadbinaryen-373cfe3a4364d657b04ea9c35e84324e9edec097.tar.gz
binaryen-373cfe3a4364d657b04ea9c35e84324e9edec097.tar.bz2
binaryen-373cfe3a4364d657b04ea9c35e84324e9edec097.zip
Allow implicit function returns. (#529)
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 67ec557ef..9afa51c7f 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -1002,6 +1002,10 @@ class S2WasmBuilder {
abort_on("function element");
}
}
+ if (!estack.empty()) {
+ addToBlock(estack.back());
+ estack.pop_back();
+ }
// finishing touches
bstack.back()->cast<Block>()->finalize();
bstack.pop_back(); // remove the base block for the function body