summary refs log tree commit diff stats
path: root/compiler/lambdalifting.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-02-16 22:54:03 +0100
committerAraq <rumpf_a@web.de>2013-02-16 22:54:03 +0100
commit8e9b39084c4ed378ef98d3e2d6cc958f976862b4 (patch)
treec56ab0ae9432fa430961a6a493ef16c2b20dd485 /compiler/lambdalifting.nim
parent5d119f61d167738bcc314b31580c6aef15f2e822 (diff)
parent4ad2d27df1ea81db97a06c05ef71f8b6534babfb (diff)
downloadNim-8e9b39084c4ed378ef98d3e2d6cc958f976862b4.tar.gz
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'compiler/lambdalifting.nim')
-rw-r--r--compiler/lambdalifting.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index 0c3eea3be..d85e4afc8 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -322,7 +322,7 @@ proc generateThunk(prc: PNode, dest: PType): PNode =
   
   # we cannot generate a proper thunk here for GC-safety reasons (see internal
   # documentation):
-  if gCmd == cmdCompileToEcmaScript: return prc
+  if gCmd == cmdCompileToJS: return prc
   result = newNodeIT(nkClosure, prc.info, dest)
   var conv = newNodeIT(nkHiddenStdConv, prc.info, dest)
   conv.add(emptyNode)
@@ -543,7 +543,7 @@ proc transformOuterProc(o: POuterContext, n: PNode): PNode =
       if x != nil: n.sons[i] = x
 
 proc liftLambdas*(fn: PSym, body: PNode): PNode =
-  if body.kind == nkEmpty or gCmd == cmdCompileToEcmaScript:
+  if body.kind == nkEmpty or gCmd == cmdCompileToJS:
     # ignore forward declaration:
     result = body
   else:
@@ -566,7 +566,7 @@ proc liftLambdas*(fn: PSym, body: PNode): PNode =
     result = ex
 
 proc liftLambdasForTopLevel*(module: PSym, body: PNode): PNode =
-  if body.kind == nkEmpty or gCmd == cmdCompileToEcmaScript:
+  if body.kind == nkEmpty or gCmd == cmdCompileToJS:
     result = body
   else:
     var o = newOuterContext(module)