MCPcopy Create free account
hub / github.com/WebAssembly/wabt / OnImportGlobal

Method OnImportGlobal

src/interp/binary-reader-interp.cc:592–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

590}
591
592Result BinaryReaderInterp::OnImportGlobal(Index import_index,
593 std::string_view module_name,
594 std::string_view field_name,
595 Index global_index,
596 Type type,
597 bool mutable_) {
598 CHECK_RESULT(validator_.OnGlobalImport(GetLocation(), type, mutable_));
599 GlobalType global_type{type, ToMutability(mutable_)};
600 module_.imports.push_back(ImportDesc{ImportType(
601 std::string(module_name), std::string(field_name), global_type.Clone())});
602 global_types_.push_back(global_type);
603 return Result::Ok;
604}
605
606Result BinaryReaderInterp::OnImportTag(Index import_index,
607 std::string_view module_name,

Callers

nothing calls this directly

Calls 5

ToMutabilityFunction · 0.85
ImportTypeClass · 0.85
OnGlobalImportMethod · 0.80
push_backMethod · 0.45
CloneMethod · 0.45

Tested by

no test coverage detected