mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-13 02:25:28 +00:00
progress
This commit is contained in:
@@ -296,7 +296,8 @@ proc incl*(s: PSym; flags: set[TSymFlag]) {.inline.} =
|
||||
s.flagsImpl.incl(flags)
|
||||
|
||||
proc incl*(s: PSym; flag: TLocFlag) {.inline.} =
|
||||
assert s.state != Sealed
|
||||
#assert s.state != Sealed
|
||||
# locImpl is a backend field so do not protect it against mutations
|
||||
if s.state == Partial: loadSym(s)
|
||||
s.locImpl.flags.incl(flag)
|
||||
|
||||
|
||||
@@ -717,6 +717,16 @@ proc writeNifModule*(config: ConfigRef; thisModule: int32; n: PNode;
|
||||
# do not write the (stmts .. ) wrapper:
|
||||
for i in 3 ..< content.len-1:
|
||||
dest.add content[i]
|
||||
|
||||
# ensure the hooks we announced end up in the NIF file regardless of
|
||||
# whether they have been used:
|
||||
for op in opsLog:
|
||||
if op.module == thisModule.int:
|
||||
let s = op.sym
|
||||
if s.state != Sealed:
|
||||
s.state = Sealed
|
||||
writeSymDef w, dest, s
|
||||
|
||||
dest.addParRi()
|
||||
|
||||
writeFile(dest, d)
|
||||
|
||||
@@ -68,11 +68,17 @@ proc findPendingModule(m: BModule, s: PSym): BModule =
|
||||
if m.config.symbolFiles == v2Sf or optCompress in m.config.globalOptions:
|
||||
let ms = s.itemId.module #getModule(s)
|
||||
result = m.g.modules[ms]
|
||||
elif m.config.cmd in {cmdNifC, cmdM}:
|
||||
var ms = getModule(s)
|
||||
if ms.position >= m.g.modules.len:
|
||||
result = newModule(m.g, ms, m.config, idGeneratorFromModule(ms))
|
||||
else:
|
||||
result = m.g.modules[ms.position]
|
||||
if result == nil:
|
||||
result = newModule(m.g, ms, m.config, idGeneratorFromModule(ms))
|
||||
else:
|
||||
var ms = getModule(s)
|
||||
result = m.g.modules[ms.position]
|
||||
if result == nil:
|
||||
result = newModule(m.g, ms, m.config, idGeneratorFromModule(ms))
|
||||
|
||||
proc initLoc(k: TLocKind, lode: PNode, s: TStorageLoc, flags: TLocFlags = {}): TLoc =
|
||||
result = TLoc(k: k, storage: s, lode: lode,
|
||||
|
||||
Reference in New Issue
Block a user