8 #include <WAVM/Runtime/Intrinsics.h> 17 std::shared_ptr<IntrinsicModuleInstance> module_instance)
18 : module_instance_{std::move(module_instance)},
24 const std::string &exportName,
25 WAVM::IR::ExternType type,
26 WAVM::Runtime::Object *&outObject) {
27 BOOST_ASSERT(moduleName ==
"env");
28 if (exportName ==
"memory") {
29 if (type.kind == WAVM::IR::ExternKind::memory) {
36 if (type.kind == WAVM::IR::ExternKind::function) {
38 exportName, asFunctionType(type));
39 if (export_func ==
nullptr) {
40 logger_->warn(
"Host function not implemented: {}", exportName);
43 outObject = WAVM::Runtime::asObject(export_func);
std::shared_ptr< IntrinsicModuleInstance > module_instance_
IntrinsicResolverImpl(std::shared_ptr< IntrinsicModuleInstance > module_instance)
bool resolve(const std::string &moduleName, const std::string &exportName, WAVM::IR::ExternType type, WAVM::Runtime::Object *&outObject) override
Logger createLogger(const std::string &tag)