further improvements for thread analysis

This commit is contained in:
Araq 2011-06-13 20:57:49 +02:00
commit ca637c019c
7 changed files with 36 additions and 17 deletions

View file

@ -568,11 +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 gGlobalOptions * {optThreads, optThreadAnalysis} ==
{optThreads, optThreadAnalysis}:
# XXX This analysis should be done as late as possible
# (forward references!)
semthreads.AnalyseThread(result)
if semthreads.needsGlobalAnalysis():
c.threadEntries.add(result)
else: result = semDirectOp(c, n, flags)
proc isTypeExpr(n: PNode): bool =