bugfix: proper cache for generic instantiations
This commit is contained in:
parent
81a917390b
commit
569c1ce5ec
24 changed files with 459 additions and 643 deletions
|
|
@ -358,6 +358,8 @@ proc analyse(c: PProcCtx, n: PNode): TThreadOwner =
|
|||
of nkAsmStmt, nkPragma, nkIteratorDef, nkProcDef, nkMethodDef,
|
||||
nkConverterDef, nkMacroDef, nkTemplateDef:
|
||||
result = toVoid
|
||||
of nkExprColonExpr:
|
||||
result = analyse(c, n.sons[1])
|
||||
else: InternalError(n.info, "analysis not implemented for: " & $n.kind)
|
||||
|
||||
proc analyseThreadProc*(prc: PSym) =
|
||||
|
|
@ -368,17 +370,6 @@ proc analyseThreadProc*(prc: PSym) =
|
|||
c.mapping[formal.id] = toTheirs # thread receives foreign data!
|
||||
discard analyse(c, prc.ast.sons[codePos])
|
||||
|
||||
when false:
|
||||
proc analyseThreadCreationCall(n: PNode) =
|
||||
# thread proc is second param of ``createThread``:
|
||||
if n[2].kind != nkSym or n[2].sym.kind != skProc:
|
||||
Message(n.info, warnAnalysisLoophole, renderTree(n))
|
||||
return
|
||||
analyseProc(n[2].sym)
|
||||
|
||||
proc AnalyseThread*(threadCreation: PNode) =
|
||||
analyseThreadCreationCall(threadCreation)
|
||||
|
||||
proc needsGlobalAnalysis*: bool =
|
||||
result = gGlobalOptions * {optThreads, optThreadAnalysis} ==
|
||||
{optThreads, optThreadAnalysis}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue