From 733ed91d3377aee2d436b60da6a4d78afa2f9bc5 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 9 Feb 2017 17:40:24 +0100 Subject: disable transitive closure computations; only semcheck procs that have the cursor --- compiler/modulegraphs.nim | 2 +- compiler/semstmts.nim | 60 ++++++++++++++++++++++++++++++----------------- compiler/suggest.nim | 4 ++-- 3 files changed, 41 insertions(+), 25 deletions(-) (limited to 'compiler') diff --git a/compiler/modulegraphs.nim b/compiler/modulegraphs.nim index 87a35b290..fb8f5cf04 100644 --- a/compiler/modulegraphs.nim +++ b/compiler/modulegraphs.nim @@ -73,7 +73,7 @@ proc addDep*(g: ModuleGraph; m: PSym, dep: int32) = deps.incl m.position.dependsOn(dep) # we compute the transitive closure later when quering the graph lazily. # this improve efficiency quite a lot: - invalidTransitiveClosure = true + #invalidTransitiveClosure = true proc addIncludeDep*(g: ModuleGraph; module, includeFile: int32) = discard hasKeyOrPut(inclToMod, includeFile, module) diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 25d4b3c74..5a59a62c0 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1177,11 +1177,22 @@ proc semOverride(c: PContext, s: PSym, n: PNode) = localError(n.info, errGenerated, "'destroy' or 'deepCopy' expected for 'override'") +proc cursorInProcAux(n: PNode): bool = + if inCheckpoint(n.info) != cpNone: return true + for i in 0..