summaryrefslogtreecommitdiff
path: root/src/asm_v_wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-07 15:00:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-12-07 15:00:53 -0800
commit4b23bd513d926fb03e549bc1cf704a6016a91a70 (patch)
tree9e7850a54c41434de195a9dc568844aee0da1e89 /src/asm_v_wasm.h
parent75e8b709fe900efcfb53813f884a1cde6e81907b (diff)
downloadbinaryen-4b23bd513d926fb03e549bc1cf704a6016a91a70.tar.gz
binaryen-4b23bd513d926fb03e549bc1cf704a6016a91a70.tar.bz2
binaryen-4b23bd513d926fb03e549bc1cf704a6016a91a70.zip
emit asm function tables in wasm2asm
Diffstat (limited to 'src/asm_v_wasm.h')
-rw-r--r--src/asm_v_wasm.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/asm_v_wasm.h b/src/asm_v_wasm.h
index 323d255ee..829d79930 100644
--- a/src/asm_v_wasm.h
+++ b/src/asm_v_wasm.h
@@ -47,6 +47,16 @@ std::string getSig(FunctionType *type) {
return ret;
}
+std::string getSig(Function *func) {
+ // generate signature
+ std::string ret;
+ ret += getSig(func->result);
+ for (auto param : func->params) {
+ ret += getSig(param.type);
+ }
+ return ret;
+}
+
} // namespace wasm
#endif // _asm_v_wasm_h_