closures shouldn't leak anymore
This commit is contained in:
parent
4215686cce
commit
56b4e3ad91
3 changed files with 4 additions and 4 deletions
|
|
@ -80,8 +80,10 @@ proc genTraverseProc(c: var TTraversalClosure, accessor: PRope, typ: PType) =
|
||||||
genTraverseProc(c, ropef("$1.Field$2", accessor, i.toRope), typ.sons[i])
|
genTraverseProc(c, ropef("$1.Field$2", accessor, i.toRope), typ.sons[i])
|
||||||
of tyRef, tyString, tySequence:
|
of tyRef, tyString, tySequence:
|
||||||
lineCg(p, cpsStmts, c.visitorFrmt, accessor)
|
lineCg(p, cpsStmts, c.visitorFrmt, accessor)
|
||||||
else:
|
of tyProc:
|
||||||
# no marker procs for closures yet
|
if typ.callConv == ccClosure:
|
||||||
|
lineCg(p, cpsStmts, c.visitorFrmt, ropef("$1.ClEnv", accessor))
|
||||||
|
else:
|
||||||
nil
|
nil
|
||||||
|
|
||||||
proc genTraverseProcSeq(c: var TTraversalClosure, accessor: PRope, typ: PType) =
|
proc genTraverseProcSeq(c: var TTraversalClosure, accessor: PRope, typ: PType) =
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
discard """
|
discard """
|
||||||
file: "tclosure3.nim"
|
file: "tclosure3.nim"
|
||||||
output: "success"
|
output: "success"
|
||||||
disabled: true
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
proc main =
|
proc main =
|
||||||
|
|
|
||||||
1
todo.txt
1
todo.txt
|
|
@ -3,7 +3,6 @@ version 0.9.0
|
||||||
|
|
||||||
- implicit deref for parameter matching
|
- implicit deref for parameter matching
|
||||||
- deprecate ``var x, y = 0`` as it's confusing for tuple consistency
|
- deprecate ``var x, y = 0`` as it's confusing for tuple consistency
|
||||||
- test sequence of closures; especially that the GC does not leak for those!
|
|
||||||
|
|
||||||
New pragmas:
|
New pragmas:
|
||||||
- ``hoist`` pragma for loop hoisting
|
- ``hoist`` pragma for loop hoisting
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue