MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / createCoremodules

Function createCoremodules

lib/executor/coredump.cpp:187–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187AST::CustomSection createCoremodules(
188 Loader::Serializer &Ser,
189 Span<const Runtime::Instance::ModuleInstance *const> ModuleInstances) {
190 AST::CustomSection CoreModules;
191 CoreModules.setName("coremodules");
192 auto &Content = CoreModules.getContent();
193 Ser.serializeU32(static_cast<uint32_t>(ModuleInstances.size()), Content);
194 for (auto &Module : ModuleInstances) {
195 auto Name = Module->getModuleName();
196 Content.push_back(0x00);
197 Content.insert(Content.end(), Name.begin(), Name.end());
198 }
199 return CoreModules;
200}
201
202AST::CustomSection
203createCoreinstances(Span<const Runtime::Instance::ModuleInstance *const>) {

Callers 1

generateCoredumpFunction · 0.85

Calls 8

setNameMethod · 0.80
serializeU32Method · 0.80
insertMethod · 0.80
getContentMethod · 0.45
sizeMethod · 0.45
getModuleNameMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected