IC: remember which modules are from the NIF cache

This commit is contained in:
Araq
2026-01-17 08:07:42 +01:00
parent 9a23ff36bd
commit 9a07e18095

View File

@@ -536,6 +536,7 @@ proc initModuleGraphFields(result: ModuleGraph) =
result.operators = initOperators(result)
result.emittedTypeInfo = initTable[string, FileIndex]()
result.cachedFiles = newStringTable()
result.cachedMods = initIntSet()
proc newModuleGraph*(cache: IdentCache; config: ConfigRef): ModuleGraph =
result = ModuleGraph()
@@ -677,6 +678,9 @@ when not defined(nimKochBootstrap):
g.ifaces[fileIdx.int].interfHidden, flags)
result.module = m
# Mark module as cached
g.cachedMods.incl fileIdx.int
# Register hooks from NIF index with the module graph
for x in result.logOps:
case x.kind