further steps for closure support
This commit is contained in:
parent
161f6f7229
commit
2c4a1dbc0c
7 changed files with 101 additions and 57 deletions
|
|
@ -578,6 +578,7 @@ proc closureSetup(p: BProc, prc: PSym) =
|
|||
if prc.typ.callConv != ccClosure: return
|
||||
# prc.ast[paramsPos].last contains the type we're after:
|
||||
var env = lastSon(prc.ast[paramsPos]).sym
|
||||
#echo "created environment: ", env.id, " for ", prc.name.s
|
||||
assignLocalVar(p, env)
|
||||
# generate cast assignment:
|
||||
appcg(p, cpsStmts, "$1 = ($2) ClEnv;$n", rdLoc(env.loc),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue