up references might work; got rid of debugging code
This commit is contained in:
parent
c1627354d1
commit
7dc0bca53a
1 changed files with 3 additions and 5 deletions
|
|
@ -340,8 +340,6 @@ proc detectCapturedVars(n: PNode; owner: PSym; c: var DetectionPass) =
|
||||||
# inner() takes a closure too!
|
# inner() takes a closure too!
|
||||||
"""
|
"""
|
||||||
|
|
||||||
echo "came here for ", n.sym.name.s, " proc ", owner.name.s
|
|
||||||
|
|
||||||
# mark 'owner' as taking a closure:
|
# mark 'owner' as taking a closure:
|
||||||
c.somethingToDo = true
|
c.somethingToDo = true
|
||||||
markAsClosure(owner, n)
|
markAsClosure(owner, n)
|
||||||
|
|
@ -351,9 +349,9 @@ proc detectCapturedVars(n: PNode; owner: PSym; c: var DetectionPass) =
|
||||||
let obj = getHiddenParam(owner).typ.lastSon
|
let obj = getHiddenParam(owner).typ.lastSon
|
||||||
addField(obj, s)
|
addField(obj, s)
|
||||||
# create required upFields:
|
# create required upFields:
|
||||||
var w = ow
|
var w = ow.skipGenericOwner
|
||||||
if false: # XXX rethink this w != owner:
|
if w != owner:
|
||||||
var up = w
|
var up = ow
|
||||||
while w != nil and w.kind != skModule:
|
while w != nil and w.kind != skModule:
|
||||||
w = w.skipGenericOwner
|
w = w.skipGenericOwner
|
||||||
markAsClosure(w, n)
|
markAsClosure(w, n)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue