diff options
author | Araq <rumpf_a@web.de> | 2018-07-09 13:07:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-07-09 13:07:55 +0200 |
commit | 470949f2e0b0b09d660169276a15e04e30a204ee (patch) | |
tree | bcac9b4009b1ba9152ff96002ddfb46cb2169674 /compiler | |
parent | f8e219b877578b0c068588f94af656b52abdb5aa (diff) | |
download | Nim-470949f2e0b0b09d660169276a15e04e30a204ee.tar.gz |
avoid AST streaming, experiment what it breaks
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/passes.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/passes.nim b/compiler/passes.nim index 45c726f2a..5477d277f 100644 --- a/compiler/passes.nim +++ b/compiler/passes.nim @@ -179,7 +179,11 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool { if graph.stopCompile(): break var n = parseTopLevelStmt(p) if n.kind == nkEmpty: break - if {sfNoForward, sfReorder} * module.flags != {}: + #if {sfNoForward, sfReorder} * module.flags != {}: + when true: + # we now process the full AST in one go, so that destructor injection for top + # level statements works correctly. + if graph.stopCompile(): break # read everything, no streaming possible var sl = newNodeI(nkStmtList, n.info) sl.add n @@ -191,7 +195,7 @@ proc processModule*(graph: ModuleGraph; module: PSym, stream: PLLStream): bool { sl = reorder(graph, sl, module) discard processTopLevelStmt(sl, a) break - elif not processTopLevelStmt(n, a): break + #elif not processTopLevelStmt(n, a): break closeParsers(p) if s.kind != llsStdIn: break closePasses(graph, a) |