summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgexprs.nim4
-rw-r--r--compiler/lexer.nim4
-rw-r--r--compiler/lowerings.nim10
-rw-r--r--compiler/renderer.nim2
-rw-r--r--compiler/semexprs.nim2
-rw-r--r--compiler/semparallel.nim1
-rw-r--r--compiler/wordrecg.nim4
7 files changed, 13 insertions, 14 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 8c0a2af53..3fe6140a3 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1923,7 +1923,9 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
         putLocIntoDest(p, d, sym.loc)
     of skTemp:
       if sym.loc.r == nil or sym.loc.t == nil:
-        internalError(n.info, "expr: temp not init " & sym.name.s)
+        #echo "FAILED FOR PRCO ", p.prc.name.s
+        #echo renderTree(p.prc.ast, {renderIds})
+        internalError(n.info, "expr: temp not init " & sym.name.s & "_" & $sym.id)
       putLocIntoDest(p, d, sym.loc)
     of skParam:
       if sym.loc.r == nil or sym.loc.t == nil:
diff --git a/compiler/lexer.nim b/compiler/lexer.nim
index 0e4dfc2ac..ea51a1399 100644
--- a/compiler/lexer.nim
+++ b/compiler/lexer.nim
@@ -40,7 +40,7 @@ type
     tkFinally, tkFor, tkFrom,
     tkGeneric, tkIf, tkImport, tkIn, tkInclude, tkInterface, 
     tkIs, tkIsnot, tkIterator,
-    tkLambda, tkLet,
+    tkLet,
     tkMacro, tkMethod, tkMixin, tkMod, tkNil, tkNot, tkNotin, 
     tkObject, tkOf, tkOr, tkOut, 
     tkProc, tkPtr, tkRaise, tkRef, tkReturn, tkShl, tkShr, tkStatic,
@@ -75,7 +75,7 @@ const
     "elif", "else", "end", "enum", "except", "export",
     "finally", "for", "from", "generic", "if", 
     "import", "in", "include", "interface", "is", "isnot", "iterator",
-    "lambda", "let", 
+    "let", 
     "macro", "method", "mixin", "mod", 
     "nil", "not", "notin", "object", "of", "or", 
     "out", "proc", "ptr", "raise", "ref", "return", 
diff --git a/compiler/lowerings.nim b/compiler/lowerings.nim
index 1f1a7647b..4050bb9b4 100644
--- a/compiler/lowerings.nim
+++ b/compiler/lowerings.nim
@@ -218,7 +218,6 @@ proc addLocalVar(varSection, varInit: PNode; owner: PSym; typ: PType;
     deepCopyCall.sons[0] = newSymNode(createMagic("deepCopy", mDeepCopy))
     deepCopyCall.sons[1] = newSymNode(result)
     deepCopyCall.sons[2] = v
-    deepCopyCall.typ = typ
     varInit.add deepCopyCall
 
 discard """
@@ -257,10 +256,10 @@ proc createWrapperProc(f: PNode; threadParam, argsParam: PSym;
   var body = newNodeI(nkStmtList, f.info)
   var threadLocalBarrier: PSym
   if barrier != nil:
-    var varSection = newNodeI(nkVarSection, barrier.info)
-    threadLocalBarrier = addLocalVar(varSection, nil, argsParam.owner, 
+    var varSection2 = newNodeI(nkVarSection, barrier.info)
+    threadLocalBarrier = addLocalVar(varSection2, nil, argsParam.owner, 
                                      barrier.typ, barrier)
-    body.add varSection
+    body.add varSection2
     body.add callCodeGenProc("barrierEnter", threadLocalBarrier.newSymNode)
   var threadLocalProm: PSym
   if spawnKind == srByVar:
@@ -268,8 +267,7 @@ proc createWrapperProc(f: PNode; threadParam, argsParam: PSym;
   elif fv != nil:
     internalAssert fv.typ.kind == tyGenericInst
     threadLocalProm = addLocalVar(varSection, nil, argsParam.owner, fv.typ, fv)
-  if barrier == nil:
-    body.add varSection
+  body.add varSection
   body.add varInit
   if fv != nil and spawnKind != srByVar:
     # generate:
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index 0b1312ccc..c97b2f321 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -925,7 +925,7 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
   of nkCheckedFieldExpr, nkHiddenAddr, nkHiddenDeref: 
     gsub(g, n.sons[0])
   of nkLambda:
-    putWithSpace(g, tkLambda, "proc")
+    putWithSpace(g, tkProc, "proc")
     gsub(g, n.sons[paramsPos])
     gsub(g, n.sons[pragmasPos])
     put(g, tkSpaces, Space)
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 7deb46af9..d040675fa 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -592,7 +592,7 @@ proc analyseIfAddressTakenInCall(c: PContext, n: PNode) =
   const 
     FakeVarParams = {mNew, mNewFinalize, mInc, ast.mDec, mIncl, mExcl, 
       mSetLengthStr, mSetLengthSeq, mAppendStrCh, mAppendStrStr, mSwap, 
-      mAppendSeqElem, mNewSeq, mReset, mShallowCopy}
+      mAppendSeqElem, mNewSeq, mReset, mShallowCopy, mDeepCopy}
   
   # get the real type of the callee
   # it may be a proc var with a generic alias type, so we skip over them
diff --git a/compiler/semparallel.nim b/compiler/semparallel.nim
index c594a4788..2ad7ef341 100644
--- a/compiler/semparallel.nim
+++ b/compiler/semparallel.nim
@@ -462,4 +462,3 @@ proc liftParallel*(owner: PSym; n: PNode): PNode =
   result.add callCodeGenProc("openBarrier", barrier)
   result.add transformSpawn(owner, body, barrier)
   result.add callCodeGenProc("closeBarrier", barrier)
-
diff --git a/compiler/wordrecg.nim b/compiler/wordrecg.nim
index c0550f702..96056eb6f 100644
--- a/compiler/wordrecg.nim
+++ b/compiler/wordrecg.nim
@@ -27,7 +27,7 @@ type
     wContinue, wConverter, wDiscard, wDistinct, wDiv, wDo, 
     wElif, wElse, wEnd, wEnum, wExcept, wExport,
     wFinally, wFor, wFrom, wGeneric, wIf, wImport, wIn, 
-    wInclude, wInterface, wIs, wIsnot, wIterator, wLambda, wLet,
+    wInclude, wInterface, wIs, wIsnot, wIterator, wLet,
     wMacro, wMethod, wMixin, wMod, wNil, 
     wNot, wNotin, wObject, wOf, wOr, wOut, wProc, wPtr, wRaise, wRef, wReturn, 
     wShl, wShr, wStatic, wTemplate, wTry, wTuple, wType, wUsing, wVar, 
@@ -107,7 +107,7 @@ const
     "elif", "else", "end", "enum", "except", "export", 
     "finally", "for", "from", "generic", "if", 
     "import", "in", "include", "interface", "is", "isnot", "iterator",
-    "lambda", "let",
+    "let",
     "macro", "method", "mixin", "mod", "nil", "not", "notin",
     "object", "of", "or", 
     "out", "proc", "ptr", "raise", "ref", "return",