summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 0f12a2f2b..abaf17e05 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -68,9 +68,7 @@ void BinaryInstWriter::visitCall(Call* curr) {
void BinaryInstWriter::visitCallIndirect(CallIndirect* curr) {
int8_t op =
curr->isReturn ? BinaryConsts::RetCallIndirect : BinaryConsts::CallIndirect;
- auto* type = parent.getModule()->getFunctionType(curr->fullType);
- Signature sig(Type(type->params), type->result);
- o << op << U32LEB(parent.getTypeIndex(sig))
+ o << op << U32LEB(parent.getTypeIndex(curr->sig))
<< U32LEB(0); // Reserved flags field
}