From b878a4f444cf23558fd6852b93a6b45b2b9f9d91 Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 17 Dec 2025 14:59:32 +0100 Subject: [PATCH] progress --- compiler/ast.nim | 2 +- compiler/ccgexprs.nim | 2 +- compiler/ccgtypes.nim | 2 +- compiler/cgen.nim | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/ast.nim b/compiler/ast.nim index c003db0002..556df74080 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -230,7 +230,7 @@ proc offset*(s: PSym): int32 {.inline.} = result = s.offsetImpl proc `offset=`*(s: PSym, val: int32) {.inline.} = - assert s.state != Sealed + #assert s.state != Sealed if s.state == Partial: loadSym(s) s.offsetImpl = val diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index ddf2ebe7fd..5e37709af9 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -3710,7 +3710,7 @@ proc expr(p: BProc, n: PNode, d: var TLoc) = inc p.splitDecls genGotoState(p, n) of nkBreakState: genBreakState(p, n, d) - of nkMixinStmt, nkBindStmt: discard + of nkMixinStmt, nkBindStmt, nkReplayAction: discard else: internalError(p.config, n.info, "expr(" & $n.kind & "); unknown node kind") proc getDefaultValue(p: BProc; typ: PType; info: TLineInfo; result: var Builder) = diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim index 53511950da..b09000d005 100644 --- a/compiler/ccgtypes.nim +++ b/compiler/ccgtypes.nim @@ -11,7 +11,7 @@ # ------------------------- Name Mangling -------------------------------- -import sighashes, modulegraphs, std/strscans +import sighashes, std/strscans import ../dist/checksums/src/checksums/md5 import std/sequtils diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 62ea950263..c271cbda31 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -16,7 +16,7 @@ import rodutils, renderer, cgendata, aliases, lowerings, lineinfos, pathutils, transf, injectdestructors, astmsgs, modulepaths, pushpoppragmas, - mangleutils, cbuilderbase + mangleutils, cbuilderbase, modulegraphs from expanddefaults import caseObjDefaultBranch @@ -70,6 +70,7 @@ proc findPendingModule(m: BModule, s: PSym): BModule = result = m.g.modules[ms] elif m.config.cmd in {cmdNifC, cmdM}: var ms = getModule(s) + registerModule m.g.graph, ms if ms.position >= m.g.modules.len: result = newModule(m.g, ms, m.config, idGeneratorFromModule(ms)) else: