summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-04-23 10:54:26 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-04-24 09:34:29 +0200
commit3e5192b5dafcfc93fae701d6cdf5ffa3d1a81e1f (patch)
tree2e8f689808fdfb37f513d0aa870594f3cd519a00 /compiler
parentba86b09e69e4c7cb6bc906f1f1db918547854161 (diff)
downloadNim-3e5192b5dafcfc93fae701d6cdf5ffa3d1a81e1f.tar.gz
compiler: remove unnecessary FileIndex type conversions
Diffstat (limited to 'compiler')
-rw-r--r--compiler/passes.nim2
-rw-r--r--compiler/reorder.nim2
-rw-r--r--compiler/rodread.nim2
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/passes.nim b/compiler/passes.nim
index d7c181676..6ff3f2bb5 100644
--- a/compiler/passes.nim
+++ b/compiler/passes.nim
@@ -166,7 +166,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream,
     p: TParsers
     a: TPassContextArray
     s: PLLStream
-    fileIdx = FileIndex module.fileIdx
+    fileIdx = module.fileIdx
   if module.id < 0:
     # new module caching mechanism:
     for i in 0..<gPassesLen:
diff --git a/compiler/reorder.nim b/compiler/reorder.nim
index 878e3b11e..56d8d5886 100644
--- a/compiler/reorder.nim
+++ b/compiler/reorder.nim
@@ -429,7 +429,7 @@ proc reorder*(graph: ModuleGraph, n: PNode, module: PSym, cache: IdentCache): PN
   if n.hasForbiddenPragma:
     return n
   var includedFiles = initIntSet()
-  let mpath = module.fileIdx.FileIndex.toFullPath
+  let mpath = module.fileIdx.toFullPath
   let n = expandIncludes(graph, module, n, mpath,
                           includedFiles, cache).splitSections
   result = newNodeI(nkStmtList, n.info)
diff --git a/compiler/rodread.nim b/compiler/rodread.nim
index aa699e337..f55c3279c 100644
--- a/compiler/rodread.nim
+++ b/compiler/rodread.nim
@@ -915,7 +915,7 @@ proc handleSymbolFile*(module: PSym; cache: IdentCache): PRodReader =
     module.id = getID()
     return nil
   idgen.loadMaxIds(options.gProjectPath / options.gProjectName)
-  let fileIdx = FileIndex module.fileIdx
+  let fileIdx = module.fileIdx
   discard checkDep(fileIdx, cache)
   if gMods[fileIdx.int32].reason == rrEmpty: internalError("handleSymbolFile")
   result = gMods[fileIdx.int32].rd