summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2016-10-04 16:29:21 -0700
committerGitHub <noreply@github.com>2016-10-04 16:29:21 -0700
commitc5b8f379fc3834bc5df10743b525570ffe1a5a73 (patch)
tree521e91350f644941da05842e297692fa160c5baa /src/wasm-binary.h
parenta8386c3d6fcf6bf28f369b85784a89a8f272b59d (diff)
downloadbinaryen-c5b8f379fc3834bc5df10743b525570ffe1a5a73.tar.gz
binaryen-c5b8f379fc3834bc5df10743b525570ffe1a5a73.tar.bz2
binaryen-c5b8f379fc3834bc5df10743b525570ffe1a5a73.zip
Binary 0xc: Remove arity on return instruction (#740)
Also skip binary roundtrip on stacky spec tests
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 8e9534973..dcbe7d6db 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1313,7 +1313,7 @@ public:
if (curr->value) {
recurse(curr->value);
}
- o << int8_t(BinaryConsts::Return) << U32LEB(curr->value ? 1 : 0);
+ o << int8_t(BinaryConsts::Return);
}
void visitHost(Host *curr) {
if (debug) std::cerr << "zz node: Host" << std::endl;
@@ -2378,9 +2378,7 @@ public:
}
void visitReturn(Return *curr) {
if (debug) std::cerr << "zz node: Return" << std::endl;
- auto arity = getU32LEB();
- assert(arity == 0 || arity == 1);
- if (arity == 1) {
+ if (currFunction->result != none) {
curr->value = popExpression();
}
}