summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-12-28 23:39:37 +0100
committerAndreas Rumpf <rumpf_a@web.de>2015-12-28 23:39:37 +0100
commitb3600a04c2389de2205479d6fbd17397589bc0b8 (patch)
tree3c89a1ea4145dec8daa9f323c41562ff7a40dbdc
parent9309f8101d5acf349611314267dbdf1f9a352022 (diff)
downloadNim-b3600a04c2389de2205479d6fbd17397589bc0b8.tar.gz
compute LL before the other transformations as that should produce more efficient code for closure iterators
-rw-r--r--compiler/transf.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/transf.nim b/compiler/transf.nim
index 98aafaaff..c35a3251a 100644
--- a/compiler/transf.nim
+++ b/compiler/transf.nim
@@ -883,12 +883,12 @@ proc transformBody*(module: PSym, n: PNode, prc: PSym): PNode =
   if nfTransf in n.flags or prc.kind in {skTemplate}:
     result = n
   else:
+    result = liftLambdas(prc, n)
+    #result = n
     var c = openTransf(module, "")
-    result = processTransf(c, n, prc)
+    result = processTransf(c, result, prc)
     liftDefer(c, result)
-    result = liftLambdas(prc, result)
-    #if prc.kind == skClosureIterator:
-    #  result = lambdalifting.liftIterator(prc, result)
+    #result = liftLambdas(prc, result)
     incl(result.flags, nfTransf)
     when useEffectSystem: trackProc(prc, result)
     #if prc.name.s == "testbody":
@@ -901,7 +901,7 @@ proc transformStmt*(module: PSym, n: PNode): PNode =
     var c = openTransf(module, "")
     result = processTransf(c, n, module)
     liftDefer(c, result)
-    result = liftLambdasForTopLevel(module, result)
+    #result = liftLambdasForTopLevel(module, result)
     incl(result.flags, nfTransf)
     when useEffectSystem: trackTopLevelStmt(module, result)