compiler: remove unnecessary FileIndex type conversions
This commit is contained in:
parent
ba86b09e69
commit
3e5192b5da
3 changed files with 3 additions and 3 deletions
|
|
@ -166,7 +166,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream,
|
||||||
p: TParsers
|
p: TParsers
|
||||||
a: TPassContextArray
|
a: TPassContextArray
|
||||||
s: PLLStream
|
s: PLLStream
|
||||||
fileIdx = FileIndex module.fileIdx
|
fileIdx = module.fileIdx
|
||||||
if module.id < 0:
|
if module.id < 0:
|
||||||
# new module caching mechanism:
|
# new module caching mechanism:
|
||||||
for i in 0..<gPassesLen:
|
for i in 0..<gPassesLen:
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,7 @@ proc reorder*(graph: ModuleGraph, n: PNode, module: PSym, cache: IdentCache): PN
|
||||||
if n.hasForbiddenPragma:
|
if n.hasForbiddenPragma:
|
||||||
return n
|
return n
|
||||||
var includedFiles = initIntSet()
|
var includedFiles = initIntSet()
|
||||||
let mpath = module.fileIdx.FileIndex.toFullPath
|
let mpath = module.fileIdx.toFullPath
|
||||||
let n = expandIncludes(graph, module, n, mpath,
|
let n = expandIncludes(graph, module, n, mpath,
|
||||||
includedFiles, cache).splitSections
|
includedFiles, cache).splitSections
|
||||||
result = newNodeI(nkStmtList, n.info)
|
result = newNodeI(nkStmtList, n.info)
|
||||||
|
|
|
||||||
|
|
@ -915,7 +915,7 @@ proc handleSymbolFile*(module: PSym; cache: IdentCache): PRodReader =
|
||||||
module.id = getID()
|
module.id = getID()
|
||||||
return nil
|
return nil
|
||||||
idgen.loadMaxIds(options.gProjectPath / options.gProjectName)
|
idgen.loadMaxIds(options.gProjectPath / options.gProjectName)
|
||||||
let fileIdx = FileIndex module.fileIdx
|
let fileIdx = module.fileIdx
|
||||||
discard checkDep(fileIdx, cache)
|
discard checkDep(fileIdx, cache)
|
||||||
if gMods[fileIdx.int32].reason == rrEmpty: internalError("handleSymbolFile")
|
if gMods[fileIdx.int32].reason == rrEmpty: internalError("handleSymbolFile")
|
||||||
result = gMods[fileIdx.int32].rd
|
result = gMods[fileIdx.int32].rd
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue