From 9a07e180956060f4bf6f544ec03979a57f5a0181 Mon Sep 17 00:00:00 2001 From: Araq Date: Sat, 17 Jan 2026 08:07:42 +0100 Subject: [PATCH] IC: remember which modules are from the NIF cache --- compiler/modulegraphs.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim index 0aedfa1b26..8f13e4d516 100644 --- a/compiler/modulegraphs.nim +++ b/compiler/modulegraphs.nim @@ -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