summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/ccgexprs.nim4
-rw-r--r--compiler/lowerings.nim10
-rw-r--r--compiler/semexprs.nim2
-rw-r--r--compiler/semparallel.nim1
4 files changed, 8 insertions, 9 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index d480373d4..a2fe9be41 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1922,7 +1922,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/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/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)
-