| 432 | } |
| 433 | |
| 434 | void TopDUContext::updateImportsCache() |
| 435 | { |
| 436 | QMutexLocker lock(&importStructureMutex); |
| 437 | |
| 438 | const bool use_fully_recursive_import_cache_computation = false; |
| 439 | |
| 440 | if (use_fully_recursive_import_cache_computation) { |
| 441 | std::set<uint> visited; |
| 442 | TopDUContextData::updateImportCacheRecursion(this, visited); |
| 443 | Q_ASSERT(visited.find(ownIndex()) != visited.end()); |
| 444 | d_func_dynamic()->m_importsCache = IndexedRecursiveImports(visited); |
| 445 | } else { |
| 446 | d_func_dynamic()->m_importsCache = IndexedRecursiveImports(); |
| 447 | TopDUContextData::updateImportCacheRecursion(ownIndex(), this, d_func_dynamic()->m_importsCache); |
| 448 | } |
| 449 | Q_ASSERT(d_func_dynamic()->m_importsCache.contains(IndexedTopDUContext(this))); |
| 450 | Q_ASSERT(usingImportsCache()); |
| 451 | Q_ASSERT(imports(this, CursorInRevision::invalid())); |
| 452 | |
| 453 | if (parsingEnvironmentFile()) |
| 454 | parsingEnvironmentFile()->setImportsCache(d_func()->m_importsCache); |
| 455 | } |
| 456 | |
| 457 | bool TopDUContext::usingImportsCache() const |
| 458 | { |
no test coverage detected