diff options
author | Araq <rumpf_a@web.de> | 2018-02-15 15:42:14 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-02-17 00:40:48 +0100 |
commit | f3b8d922169bcf99d7430854d53765082f3ad5a8 (patch) | |
tree | 87fc1780508ec9d710c1ea7466509bf381ea0348 /compiler/rodread.nim | |
parent | 89782460a306edbf5e77872bd009775de785e724 (diff) | |
download | Nim-f3b8d922169bcf99d7430854d53765082f3ad5a8.tar.gz |
new .rod file implementation; part 1: writing of the file
Diffstat (limited to 'compiler/rodread.nim')
-rw-r--r-- | compiler/rodread.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rodread.nim b/compiler/rodread.nim index 6e952606e..84f175cb5 100644 --- a/compiler/rodread.nim +++ b/compiler/rodread.nim @@ -813,6 +813,7 @@ proc rrGetSym(r: PRodReader, id: int, info: TLineInfo): PSym = encodeVInt(id, x) internalError(info, "missing from both indexes: +" & x) var rd = getReader(moduleID) + doAssert rd != nil d = iiTableGet(rd.index.tab, id) if d != InvalidKey: result = decodeSymSafePos(rd, d, info) @@ -911,7 +912,7 @@ proc checkDep(fileIdx: int32; cache: IdentCache): TReasonForRecompile = proc handleSymbolFile*(module: PSym; cache: IdentCache): PRodReader = let fileIdx = module.fileIdx - if gSymbolFiles in {disabledSf, writeOnlySf}: + if gSymbolFiles in {disabledSf, writeOnlySf, v2Sf}: module.id = getID() return nil idgen.loadMaxIds(options.gProjectPath / options.gProjectName) @@ -1236,4 +1237,4 @@ proc viewFile(rodfile: string) = outf.close when isMainModule: - viewFile(paramStr(1).addFileExt(rodExt)) + viewFile(paramStr(1).addFileExt(RodExt)) |