summaryrefslogtreecommitdiff
path: root/src/passes/GenerateDynCalls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/GenerateDynCalls.cpp')
-rw-r--r--src/passes/GenerateDynCalls.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/passes/GenerateDynCalls.cpp b/src/passes/GenerateDynCalls.cpp
index df5145402..a53f1d0de 100644
--- a/src/passes/GenerateDynCalls.cpp
+++ b/src/passes/GenerateDynCalls.cpp
@@ -127,7 +127,10 @@ void GenerateDynCalls::generateDynCallThunk(Signature sig) {
for (const auto& param : sig.params) {
args.push_back(builder.makeLocalGet(++i, param));
}
- Expression* call = builder.makeCallIndirect(fptr, args, sig);
+ // FIXME: Should the existence of a table be ensured here? i.e. create one if
+ // there is none?
+ Expression* call =
+ builder.makeCallIndirect(Name::fromInt(0), fptr, args, sig);
f->body = call;
wasm->addFunction(std::move(f));