diff options
Diffstat (limited to 'src/shell-interface.h')
-rw-r--r-- | src/shell-interface.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h index 63cbd9807..52533f37c 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -149,7 +149,7 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { Literal callTable(Index index, LiteralList& arguments, - Type result, + Type results, ModuleInstance& instance) override { if (index >= table.size()) { trap("callTable overflow"); @@ -158,15 +158,16 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { if (!func) { trap("uninitialized table element"); } - if (func->params.size() != arguments.size()) { + const std::vector<Type>& params = func->sig.params.expand(); + if (params.size() != arguments.size()) { trap("callIndirect: bad # of arguments"); } - for (size_t i = 0; i < func->params.size(); i++) { - if (func->params[i] != arguments[i].type) { + for (size_t i = 0; i < params.size(); i++) { + if (params[i] != arguments[i].type) { trap("callIndirect: bad argument type"); } } - if (func->result != result) { + if (func->sig.results != results) { trap("callIndirect: bad result type"); } if (func->imported()) { |