Merge pull request #1281 from Araq/new_spawn

New spawn
This commit is contained in:
Andreas Rumpf 2014-06-16 23:03:17 +02:00
commit 2ec1501c7a
42 changed files with 2115 additions and 192 deletions

View file

@ -1652,7 +1652,10 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
of mSlurp..mQuoteAst:
localError(e.info, errXMustBeCompileTime, e.sons[0].sym.name.s)
of mSpawn:
let n = lowerings.wrapProcForSpawn(p.module.module, e.sons[1])
let n = lowerings.wrapProcForSpawn(p.module.module, e, e.typ, nil, nil)
expr(p, n, d)
of mParallel:
let n = semparallel.liftParallel(p.module.module, e)
expr(p, n, d)
else: internalError(e.info, "genMagicExpr: " & $op)