Replace countup(x, y-1) with x ..< y

This commit is contained in:
Clyybber 2019-05-07 12:04:00 +02:00
commit f18b3af9d4
58 changed files with 312 additions and 312 deletions

View file

@ -200,7 +200,7 @@ proc copyValue(src: PNode): PNode =
of nkStrLit..nkTripleStrLit: result.strVal = src.strVal
else:
newSeq(result.sons, sonsLen(src))
for i in countup(0, sonsLen(src) - 1):
for i in 0 ..< sonsLen(src):
result.sons[i] = copyValue(src.sons[i])
proc asgnComplex(x: var TFullReg, y: TFullReg) =
@ -778,7 +778,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
addSon(b, regs[rb].regToNode)
var r = diffSets(c.config, regs[ra].node, b)
discardSons(regs[ra].node)
for i in countup(0, sonsLen(r) - 1): addSon(regs[ra].node, r.sons[i])
for i in 0 ..< sonsLen(r): addSon(regs[ra].node, r.sons[i])
of opcCard:
decodeB(rkInt)
regs[ra].intVal = nimsets.cardSet(c.config, regs[rb].node)
@ -1756,7 +1756,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
of opcNDel:
decodeBC(rkNode)
let bb = regs[rb].intVal.int
for i in countup(0, regs[rc].intVal.int-1):
for i in 0 ..< regs[rc].intVal.int:
delSon(regs[ra].node, bb)
of opcGenSym:
decodeBC(rkNode)