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.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/asm_v_wasm.h b/src/asm_v_wasm.h
index 27acf3dcc..cfb4d44d5 100644
--- a/src/asm_v_wasm.h
+++ b/src/asm_v_wasm.h
@@ -33,15 +33,31 @@ std::string getSig(FunctionType *type);
std::string getSig(Function *func);
-std::string getSig(CallBase *call);
+template<typename CallBase>
+std::string getSig(CallBase *call) {
+ std::string ret;
+ ret += getSig(call->type);
+ for (auto operand : call->operands) {
+ ret += getSig(operand->type);
+ }
+ return ret;
+}
-std::string getSig(WasmType result, const ExpressionList& operands);
+template<typename ListType>
+std::string getSig(WasmType result, const ListType& operands) {
+ std::string ret;
+ ret += getSig(result);
+ for (auto operand : operands) {
+ ret += getSig(operand->type);
+ }
+ return ret;
+}
WasmType sigToWasmType(char sig);
FunctionType sigToFunctionType(std::string sig);
-FunctionType* ensureFunctionType(std::string sig, Module* wasm, MixedArena& allocator);
+FunctionType* ensureFunctionType(std::string sig, Module* wasm);
} // namespace wasm