diff options
Diffstat (limited to 'src/passes/FuncCastEmulation.cpp')
-rw-r--r-- | src/passes/FuncCastEmulation.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/passes/FuncCastEmulation.cpp b/src/passes/FuncCastEmulation.cpp index d8b9f9b1d..2d7bdad54 100644 --- a/src/passes/FuncCastEmulation.cpp +++ b/src/passes/FuncCastEmulation.cpp @@ -136,7 +136,7 @@ struct ParallelFuncCastEmulation return new ParallelFuncCastEmulation(ABIType, numParams); } - ParallelFuncCastEmulation(Signature ABIType, Index numParams) + ParallelFuncCastEmulation(HeapType ABIType, Index numParams) : ABIType(ABIType), numParams(numParams) {} void visitCallIndirect(CallIndirect* curr) { @@ -152,7 +152,7 @@ struct ParallelFuncCastEmulation curr->operands.push_back(LiteralUtils::makeZero(Type::i64, *getModule())); } // Set the new types - curr->sig = ABIType; + curr->heapType = ABIType; auto oldType = curr->type; curr->type = Type::i64; curr->finalize(); // may be unreachable @@ -162,7 +162,7 @@ struct ParallelFuncCastEmulation private: // The signature of a call with the right params and return - Signature ABIType; + HeapType ABIType; Index numParams; }; @@ -171,7 +171,8 @@ struct FuncCastEmulation : public Pass { Index numParams = std::stoul(runner->options.getArgumentOrDefault("max-func-params", "16")); // we just need the one ABI function type for all indirect calls - Signature ABIType(Type(std::vector<Type>(numParams, Type::i64)), Type::i64); + HeapType ABIType( + Signature(Type(std::vector<Type>(numParams, Type::i64)), Type::i64)); // Add a thunk for each function in the table, and do the call through it. std::unordered_map<Name, Name> funcThunks; ElementUtils::iterAllElementFunctionNames(module, [&](Name& name) { |