diff options
author | Araq <rumpf_a@web.de> | 2014-01-23 12:22:34 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-01-23 12:22:34 +0100 |
commit | 1465a7b08096d825f77a85e5594266d78ff022a9 (patch) | |
tree | dce7af6986c97b2e06879510e84a88b9f3293cfc /compiler | |
parent | d01ff8994b8805a6558c87f1f58c789e42c93694 (diff) | |
download | Nim-1465a7b08096d825f77a85e5594266d78ff022a9.tar.gz |
small code cleanups
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ast.nim | 1 | ||||
-rw-r--r-- | compiler/lambdalifting.nim | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim index 82cc2c96f..0e351a31a 100644 --- a/compiler/ast.nim +++ b/compiler/ast.nim @@ -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 diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim index a9c4a8757..01eb49463 100644 --- a/compiler/lambdalifting.nim +++ b/compiler/lambdalifting.nim @@ -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,8 +775,7 @@ 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) var env = copySym(getHiddenParam(iter)) |