diff options
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r-- | src/s2wasm.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index dd53fc8e0..48d6d9350 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -570,10 +570,8 @@ private: auto typeName = cashew::IString((std::string("FUNCSIG_") + getSig(call)).c_str(), false); if (wasm.functionTypesMap.count(typeName) == 0) { auto type = allocator.alloc<FunctionType>(); + *type = sigToFunctionType(getSig(curr)); type->name = typeName; - for (auto operand : call->operands) { - type->params.push_back(operand->type); - } wasm.addFunctionType(type); call->fullType = type; } else { @@ -674,8 +672,8 @@ private: break; } case 'n': { - if (match("neg")) makeUnary(UnaryOp::Neg, i32); - else if (match("nearest")) makeUnary(UnaryOp::Nearest, i32); + if (match("neg")) makeUnary(UnaryOp::Neg, type); + else if (match("nearest")) makeUnary(UnaryOp::Nearest, type); else if (match("ne")) makeBinary(BinaryOp::Ne, i32); else abort_on("type.n"); break; |