summaryrefslogtreecommitdiff
path: root/src/asm_v_wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm_v_wasm.h')
-rw-r--r--src/asm_v_wasm.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/asm_v_wasm.h b/src/asm_v_wasm.h
index 829d79930..1bf689802 100644
--- a/src/asm_v_wasm.h
+++ b/src/asm_v_wasm.h
@@ -38,7 +38,6 @@ char getSig(WasmType type) {
}
std::string getSig(FunctionType *type) {
- // generate signature
std::string ret;
ret += getSig(type->result);
for (auto param : type->params) {
@@ -48,7 +47,6 @@ std::string getSig(FunctionType *type) {
}
std::string getSig(Function *func) {
- // generate signature
std::string ret;
ret += getSig(func->result);
for (auto param : func->params) {
@@ -57,6 +55,15 @@ std::string getSig(Function *func) {
return ret;
}
+std::string getSig(CallBase *call) {
+ std::string ret;
+ ret += getSig(call->type);
+ for (auto operand : call->operands) {
+ ret += getSig(operand->type);
+ }
+ return ret;
+}
+
} // namespace wasm
#endif // _asm_v_wasm_h_