basic thread analysis working

This commit is contained in:
Araq 2011-06-13 16:22:19 +02:00
commit 9f9f0f0818
11 changed files with 179 additions and 44 deletions

View file

@ -568,7 +568,8 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode =
of mEcho: result = semEcho(c, setMs(n, s))
of mCreateThread:
result = semDirectOp(c, n, flags)
if optThreads in gGlobalOptions:
if gGlobalOptions * {optThreads, optThreadAnalysis} ==
{optThreads, optThreadAnalysis}:
# XXX This analysis should be done as late as possible
# (forward references!)
semthreads.AnalyseThread(result)