next steps in giving Nim a decent DFA infrastructure

This commit is contained in:
Araq 2017-12-18 13:12:10 +01:00
commit 2502f86d2f
2 changed files with 86 additions and 8 deletions

View file

@ -979,10 +979,10 @@ proc trackProc*(s: PSym, body: PNode) =
message(s.info, warnLockLevel,
"declared lock level is $1, but real lock level is $2" %
[$s.typ.lockLevel, $t.maxLockLevel])
when false:
when defined(useDfa):
if s.kind == skFunc:
when defined(dfa): dataflowAnalysis(s, body)
trackWrites(s, body)
dataflowAnalysis(s, body)
when false: trackWrites(s, body)
proc trackTopLevelStmt*(module: PSym; n: PNode) =
if n.kind in {nkPragma, nkMacroDef, nkTemplateDef, nkProcDef, nkFuncDef,