small code cleanups
This commit is contained in:
parent
d01ff8994b
commit
1465a7b080
3 changed files with 3 additions and 4 deletions
|
|
@ -287,7 +287,6 @@ const
|
|||
|
||||
sfNoRoot* = sfBorrow # a local variable is provably no root so it doesn't
|
||||
# require RC ops
|
||||
sfClosureCreated* = sfDiscriminant # for transf-lambdalifting interaction
|
||||
|
||||
const
|
||||
# getting ready for the future expr/stmt merge
|
||||
|
|
|
|||
|
|
@ -422,7 +422,6 @@ proc transformOuterConv(n: PNode): PNode =
|
|||
proc makeClosure(prc, env: PSym, info: TLineInfo): PNode =
|
||||
result = newNodeIT(nkClosure, info, prc.typ)
|
||||
result.add(newSymNode(prc))
|
||||
if prc.kind == skIterator: incl(prc.flags, sfClosureCreated)
|
||||
if env == nil:
|
||||
result.add(newNodeIT(nkNilLit, info, getSysType(tyNil)))
|
||||
else:
|
||||
|
|
@ -776,7 +775,6 @@ proc liftIterSym*(n: PNode): PNode =
|
|||
# transforms (iter) to (let env = newClosure[iter](); (iter, env))
|
||||
let iter = n.sym
|
||||
assert iter.kind == skIterator
|
||||
#if sfClosureCreated in iter.flags: return n
|
||||
|
||||
result = newNodeIT(nkStmtListExpr, n.info, n.typ)
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ Language Additions
|
|||
evaluable at compile-time.
|
||||
- Support for user-defined type classes has been added.
|
||||
- The *command syntax* is supported in a lot more contexts.
|
||||
- Anonymous iterators are now supported and iterators can capture variables
|
||||
of an outer proc.
|
||||
|
||||
|
||||
Tools improvements
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue