-
Notifications
You must be signed in to change notification settings - Fork 827
Closed
Description
Hello I am trying to use BinaryenCallRef but its not clear how. Unfortunately there is no example in c-api-kitchen-sink or other docs.
I tried it this way:
BinaryenAddFunction(mod, "name", BinaryenTypeCreate(nullptr, 0), BinaryenTypeCreate(nullptr, 0), nullptr, 0, BinaryenUnreachable(mod));
auto exp = BinaryenRefFunc(mod, "name", BinaryenTypeFuncref());
exp = BinaryenCallRef(mod, exp, nullptr, 0, BinaryenTypeFuncref(), false);
BinaryenAddFunction(mod, "name2", BinaryenTypeCreate(nullptr, 0), BinaryenTypeCreate(nullptr, 0), nullptr, 0, exp);
But the end boss is always this assert,
Any tips how I should use it or should I go back to call_indirect for now?
Metadata
Metadata
Assignees
Labels
No labels