distinguish between 'reorder' and 'noforward'

This commit is contained in:
Andreas Rumpf 2017-07-26 08:20:02 +02:00
commit 50f62ff44a
5 changed files with 53 additions and 8 deletions

View file

@ -202,7 +202,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream,
if graph.stopCompile(): break
var n = parseTopLevelStmt(p)
if n.kind == nkEmpty: break
if sfNoForward in module.flags:
if {sfNoForward, sfReorder} * module.flags != {}:
# read everything, no streaming possible
var sl = newNodeI(nkStmtList, n.info)
sl.add n
@ -210,7 +210,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream,
var n = parseTopLevelStmt(p)
if n.kind == nkEmpty: break
sl.add n
if isDefined"nimreorder":
if sfReorder in module.flags:
sl = reorder sl
discard processTopLevelStmt(sl, a)
break