summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 27f7edffb..dbf142fd3 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -233,23 +233,13 @@ private:
}
}
- char getSigFromType(WasmType type) {
- switch (type) {
- case i32: return 'i';
- case f32: return 'f';
- case f64: return 'd';
- case none: return 'v';
- default: abort();
- }
- }
-
FunctionType *getFunctionType(Ref parent, ExpressionList& operands) {
// generate signature
WasmType result = detectWasmType(parent, nullptr);
std::string str = "FUNCSIG$";
- str += getSigFromType(result);
+ str += getSig(result);
for (auto operand : operands) {
- str += getSigFromType(operand->type);
+ str += getSig(operand->type);
}
IString sig(str.c_str(), false);
if (wasm.functionTypesMap.find(sig) == wasm.functionTypesMap.end()) {