further steps for closure support
This commit is contained in:
parent
fd4836a5d6
commit
161f6f7229
8 changed files with 41 additions and 21 deletions
|
|
@ -221,7 +221,8 @@ proc generateThunk(c: PTransf, prc: PNode, dest: PType): PNode =
|
|||
## Converts 'prc' into '(thunk, nil)' so that it's compatible with
|
||||
## a closure.
|
||||
|
||||
# XXX we hack around here by generating a 'cast' instead of a proper thunk.
|
||||
# we cannot generate a proper thunk here for GC-safety reasons (see internal
|
||||
# documentation):
|
||||
result = newNodeIT(nkClosure, prc.info, dest)
|
||||
var conv = newNodeIT(nkHiddenStdConv, prc.info, dest)
|
||||
conv.add(emptyNode)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue