summary refs log tree commit diff stats
path: root/compiler/semparallel.nim
diff options
context:
space:
mode:
authorcooldome <ariabushenko@bk.ru>2018-06-26 23:33:34 +0100
committercooldome <ariabushenko@bk.ru>2018-06-26 23:33:34 +0100
commit34170db96308c367357ece15404815727bce223a (patch)
tree0461d115e39feff0b5ea855fb56f9882ce1eba2c /compiler/semparallel.nim
parent0b709fb916923b0d5e9eab06fc8766e46e63d955 (diff)
parent19ea3a70d2d6d404235e0f5250d6b681d56903a5 (diff)
downloadNim-34170db96308c367357ece15404815727bce223a.tar.gz
Merge branch 'devel' into Fixes-7845
Diffstat (limited to 'compiler/semparallel.nim')
-rw-r--r--compiler/semparallel.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/semparallel.nim b/compiler/semparallel.nim
index ea5aab628..0d780bdee 100644
--- a/compiler/semparallel.nim
+++ b/compiler/semparallel.nim
@@ -136,8 +136,8 @@ proc checkLe(c: AnalysisCtx; a, b: PNode) =
     localError(c.graph.config, a.info, "can prove: " & ?a & " > " & ?b & " (bounds check)")
 
 proc checkBounds(c: AnalysisCtx; arr, idx: PNode) =
-  checkLe(c, arr.lowBound, idx)
-  checkLe(c, idx, arr.highBound(c.guards.o))
+  checkLe(c, lowBound(c.graph.config, arr), idx)
+  checkLe(c, idx, highBound(c.graph.config, arr, c.guards.o))
 
 proc addLowerBoundAsFacts(c: var AnalysisCtx) =
   for v in c.locals:
@@ -438,7 +438,7 @@ proc transformSpawn(g: ModuleGraph; owner: PSym; n, barrier: PNode): PNode =
         let t = b[1][0].typ.sons[0]
         if spawnResult(t, true) == srByVar:
           result.add wrapProcForSpawn(g, owner, m, b.typ, barrier, it[0])
-          it.sons[it.len-1] = emptyNode
+          it.sons[it.len-1] = newNodeI(nkEmpty, it.info)
         else:
           it.sons[it.len-1] = wrapProcForSpawn(g, owner, m, b.typ, barrier, nil)
     if result.isNil: result = n
@@ -483,7 +483,7 @@ proc liftParallel*(g: ModuleGraph; owner: PSym; n: PNode): PNode =
   checkArgs(a, body)
 
   var varSection = newNodeI(nkVarSection, n.info)
-  var temp = newSym(skTemp, getIdent"barrier", owner, n.info)
+  var temp = newSym(skTemp, getIdent(g.cache, "barrier"), owner, n.info)
   temp.typ = magicsys.getCompilerProc(g, "Barrier").typ
   incl(temp.flags, sfFromGeneric)
   let tempNode = newSymNode(temp)