From 720c73e6d5c8b21a2d6d528a3a8947e498e9d1ad Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 3 Jan 2018 02:36:29 +0100 Subject: symbol files: fixes the logic for multi-methods --- compiler/cgen.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/cgen.nim') diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 217138dd0..573a14927 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -1258,7 +1258,7 @@ proc resetModule*(m: BModule) = # indicate that this is now cached module # the cache will be invalidated by nullifying gModules - m.fromCache = true + #m.fromCache = true m.g = nil # we keep only the "merge info" information for the module @@ -1390,7 +1390,7 @@ proc writeModule(m: BModule, pending: bool) = # generate code for the init statements of the module: let cfile = getCFile(m) - if not m.fromCache or optForceFullMake in gGlobalOptions: + if m.rd == nil or optForceFullMake in gGlobalOptions: genInitCode(m) finishTypeDescriptions(m) if sfMainModule in m.module.flags: @@ -1465,10 +1465,10 @@ proc cgenWriteModules*(backend: RootRef, config: ConfigRef) = if g.generatedHeader != nil: finishModule(g.generatedHeader) while g.forwardedProcsCounter > 0: for m in cgenModules(g): - if not m.fromCache: + if m.rd == nil: finishModule(m) for m in cgenModules(g): - if m.fromCache: + if m.rd != nil: m.updateCachedModule else: m.writeModule(pending=true) -- cgit 1.4.1-2-gfad0