summaryrefslogtreecommitdiff
path: root/src/shell-interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shell-interface.h')
-rw-r--r--src/shell-interface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h
index f1b68ab60..03b190626 100644
--- a/src/shell-interface.h
+++ b/src/shell-interface.h
@@ -150,6 +150,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
}
Literal callTable(Index index,
+ Signature sig,
LiteralList& arguments,
Type results,
ModuleInstance& instance) override {
@@ -160,6 +161,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface {
if (!func) {
trap("uninitialized table element");
}
+ if (sig != func->sig) {
+ trap("callIndirect: function signatures don't match");
+ }
const std::vector<Type>& params = func->sig.params.expand();
if (params.size() != arguments.size()) {
trap("callIndirect: bad # of arguments");