summary refs log tree commit diff stats
path: root/compiler/rodread.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-02-15 15:42:14 +0100
committerAraq <rumpf_a@web.de>2018-02-17 00:40:48 +0100
commitf3b8d922169bcf99d7430854d53765082f3ad5a8 (patch)
tree87fc1780508ec9d710c1ea7466509bf381ea0348 /compiler/rodread.nim
parent89782460a306edbf5e77872bd009775de785e724 (diff)
downloadNim-f3b8d922169bcf99d7430854d53765082f3ad5a8.tar.gz
new .rod file implementation; part 1: writing of the file
Diffstat (limited to 'compiler/rodread.nim')
-rw-r--r--compiler/rodread.nim5
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))