From 373cfe3a4364d657b04ea9c35e84324e9edec097 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 19 May 2016 17:05:58 -0700 Subject: Allow implicit function returns. (#529) --- src/s2wasm.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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()->finalize(); bstack.pop_back(); // remove the base block for the function body -- cgit v1.2.3