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

@ -199,6 +199,10 @@ proc myProcess(context: PPassContext, n: PNode): PNode =
RecoverContext(c)
result = ast.emptyNode
proc checkThreads(c: PContext) =
for i in 0 .. c.threadEntries.len-1:
semthreads.AnalyseThread(c.threadEntries[i])
proc myClose(context: PPassContext, n: PNode): PNode =
var c = PContext(context)
closeScope(c.tab) # close module's scope
@ -208,6 +212,7 @@ proc myClose(context: PPassContext, n: PNode): PNode =
else:
InternalError(n.info, "n is not nil") #result := n;
addCodeForGenerics(c, result)
checkThreads(c)
popOwner()
popProcCon(c)