From dfe067a74a0b62b74bf9680f1982805132ac9ffa Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sat, 29 Jul 2017 10:20:39 +0200 Subject: reorder pass: consider the 'using' statement; disabled debug output --- compiler/reorder.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler') diff --git a/compiler/reorder.nim b/compiler/reorder.nim index 215bc4112..06b937421 100644 --- a/compiler/reorder.nim +++ b/compiler/reorder.nim @@ -35,7 +35,7 @@ proc computeDeps(n: PNode, declares, uses: var IntSet; topLevel: bool) = of procDefs: decl(n[0]) for i in 1..bodyPos: deps(n[i]) - of nkLetSection, nkVarSection: + of nkLetSection, nkVarSection, nkUsingStmt: for a in n: if a.kind in {nkIdentDefs, nkVarTuple}: for j in countup(0, a.len-3): decl(a[j]) @@ -99,4 +99,4 @@ proc reorder*(n: PNode): PNode = result.sons[i].flags = result.sons[i].flags - {nfTempMark, nfPermMark} result.sons[L - i].flags = result.sons[L - i].flags - {nfTempMark, nfPermMark} swap(result.sons[i], result.sons[L - i]) - echo result + #echo result -- cgit 1.4.1-2-gfad0