You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i think add and Get , It's a bit wasteful. why not return BinaryenFunctionRef on BinaryenAddFunctionImport?
i find that, BinaryenAddFunction directly setExplicitName. why not BinaryenAddFunctionImport?
void BinaryenAddFunctionImport(BinaryenModuleRef module,
const char* internalName,
const char* externalModuleName,
const char* externalBaseName,
BinaryenType params,
BinaryenType results) {
auto* func = ((Module*)module)->getFunctionOrNull(internalName);
if (func == nullptr) {
auto func = std::make_unique<Function>();
if (internalName)
func->setExplicitName(internalName);
func->name = internalName;
func->module = externalModuleName;
func->base = externalBaseName;
// TODO: Take a HeapType rather than params and results.
func->type = Signature(Type(params), Type(results));
((Module*)module)->addFunction(std::move(func));
} else {
// already exists so just set module and base
func->module = externalModuleName;
func->base = externalBaseName;
}
}
The text was updated successfully, but these errors were encountered:
i think add and Get , It's a bit wasteful. why not return BinaryenFunctionRef on BinaryenAddFunctionImport?
i find that, BinaryenAddFunction directly setExplicitName. why not BinaryenAddFunctionImport?
The text was updated successfully, but these errors were encountered: