| 294 | } |
| 295 | |
| 296 | bool CompileDesign::compilation_() { |
| 297 | Design* design = m_compiler->getDesign(); |
| 298 | |
| 299 | auto& all_files = design->getAllFileContents(); |
| 300 | |
| 301 | #if 0 |
| 302 | int32_t maxThreadCount = m_compiler->getCommandLineParser()->getNbMaxTreads(); |
| 303 | #else |
| 304 | // The Actual Module... Compilation is not Multithread safe anymore due to |
| 305 | // the UHDM model creation |
| 306 | int32_t maxThreadCount = 0; |
| 307 | #endif |
| 308 | |
| 309 | int32_t index = 0; |
| 310 | do { |
| 311 | SymbolTable* symbols = |
| 312 | m_compiler->getCommandLineParser()->getSymbolTable()->CreateSnapshot(); |
| 313 | m_symbolTables.push_back(symbols); |
| 314 | ErrorContainer* errors = new ErrorContainer( |
| 315 | symbols, m_compiler->getErrorContainer()->getLogListener()); |
| 316 | errors->registerCmdLine(m_compiler->getCommandLineParser()); |
| 317 | m_errorContainers.push_back(errors); |
| 318 | index++; |
| 319 | } while (index < maxThreadCount); |
| 320 | |
| 321 | for (auto file : all_files) { |
| 322 | if (m_compiler->isLibraryFile(file.first)) { |
| 323 | file.second->setLibraryCellFile(); |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | compileMT_<FileContent, Design::FileIdDesignContentMap, FunctorCreateLookup>( |
| 328 | all_files, maxThreadCount); |
| 329 | |
| 330 | compileMT_<FileContent, Design::FileIdDesignContentMap, FunctorResolve>( |
| 331 | all_files, maxThreadCount); |
| 332 | |
| 333 | compileMT_<FileContent, Design::FileIdDesignContentMap, |
| 334 | FunctorCompileFileContentDecl>(all_files, maxThreadCount); |
| 335 | |
| 336 | collectObjects_(all_files, design, false); |
| 337 | m_compiler->getDesign()->orderPackages(); |
| 338 | |
| 339 | // Compile packages in strict order |
| 340 | for (auto itr : m_compiler->getDesign()->getOrderedPackageDefinitions()) { |
| 341 | FunctorCompilePackage funct(this, itr, m_compiler->getDesign(), |
| 342 | m_symbolTables[0], m_errorContainers[0]); |
| 343 | funct.operator()(); |
| 344 | } |
| 345 | |
| 346 | compileMT_<FileContent, Design::FileIdDesignContentMap, |
| 347 | FunctorCompileFileContent>(all_files, maxThreadCount); |
| 348 | |
| 349 | // Compile modules |
| 350 | compileMT_<ModuleDefinition, ModuleNameModuleDefinitionMap, |
| 351 | FunctorCompileModule>( |
| 352 | m_compiler->getDesign()->getModuleDefinitions(), maxThreadCount); |
| 353 |
nothing calls this directly
no test coverage detected