| 185 | } |
| 186 | |
| 187 | AST::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 | |
| 202 | AST::CustomSection |
| 203 | createCoreinstances(Span<const Runtime::Instance::ModuleInstance *const>) { |
no test coverage detected