summary refs log tree commit diff stats
path: root/compiler/semparallel.nim
diff options
context:
space:
mode:
authorcooldome <ariabushenko@bk.ru>2018-06-12 21:19:30 +0100
committercooldome <ariabushenko@bk.ru>2018-06-12 21:19:30 +0100
commit37aa488f99033fe9d7debfd6b8129a4a3f26c6e4 (patch)
tree7eee9f92283abbf266d549d8a538c5271fce1f36 /compiler/semparallel.nim
parenta877a58f32790d9ef574bcd466b327989cdd6acf (diff)
parentf555338ce8b4053bec48ee2ba8299a757db1ee67 (diff)
downloadNim-37aa488f99033fe9d7debfd6b8129a4a3f26c6e4.tar.gz
merge devel
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)