* fixes #6634 * remove more usages of unary <
This commit is contained in:
parent
b4580ad002
commit
7c03c882f5
6 changed files with 7 additions and 7 deletions
|
|
@ -339,7 +339,7 @@ proc makeNotType*(c: PContext, t1: PType): PType =
|
||||||
|
|
||||||
proc nMinusOne*(n: PNode): PNode =
|
proc nMinusOne*(n: PNode): PNode =
|
||||||
result = newNode(nkCall, n.info, @[
|
result = newNode(nkCall, n.info, @[
|
||||||
newSymNode(getSysMagic("<", mUnaryLt)),
|
newSymNode(getSysMagic("pred", mPred)),
|
||||||
n])
|
n])
|
||||||
|
|
||||||
# Remember to fix the procs below this one when you make changes!
|
# Remember to fix the procs below this one when you make changes!
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ proc `$`*(self: SecureHash): string =
|
||||||
result.add(toHex(int(v), 2))
|
result.add(toHex(int(v), 2))
|
||||||
|
|
||||||
proc parseSecureHash*(hash: string): SecureHash =
|
proc parseSecureHash*(hash: string): SecureHash =
|
||||||
for i in 0.. <Sha1DigestSize:
|
for i in 0 ..< Sha1DigestSize:
|
||||||
Sha1Digest(result)[i] = uint8(parseHexInt(hash[i*2] & hash[i*2 + 1]))
|
Sha1Digest(result)[i] = uint8(parseHexInt(hash[i*2] & hash[i*2 + 1]))
|
||||||
|
|
||||||
proc `==`*(a, b: SecureHash): bool =
|
proc `==`*(a, b: SecureHash): bool =
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ proc genericHash(dest: pointer, mt: PNimType): int =
|
||||||
proc dbgRegisterWatchpoint(address: pointer, name: cstring,
|
proc dbgRegisterWatchpoint(address: pointer, name: cstring,
|
||||||
typ: PNimType) {.compilerproc.} =
|
typ: PNimType) {.compilerproc.} =
|
||||||
let L = watchPointsLen
|
let L = watchPointsLen
|
||||||
for i in 0.. <L:
|
for i in 0 .. pred(L):
|
||||||
if watchPoints[i].name == name:
|
if watchPoints[i].name == name:
|
||||||
# address may have changed:
|
# address may have changed:
|
||||||
watchPoints[i].address = address
|
watchPoints[i].address = address
|
||||||
|
|
@ -288,7 +288,7 @@ var
|
||||||
|
|
||||||
proc checkWatchpoints =
|
proc checkWatchpoints =
|
||||||
let L = watchPointsLen
|
let L = watchPointsLen
|
||||||
for i in 0.. <L:
|
for i in 0 .. pred(L):
|
||||||
let newHash = genericHash(watchPoints[i].address, watchPoints[i].typ)
|
let newHash = genericHash(watchPoints[i].address, watchPoints[i].typ)
|
||||||
if newHash != watchPoints[i].oldValue:
|
if newHash != watchPoints[i].oldValue:
|
||||||
dbgWatchpointHook(watchPoints[i].name)
|
dbgWatchpointHook(watchPoints[i].name)
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ proc reprStrAux(result: var string, s: cstring; len: int) =
|
||||||
add result, "nil"
|
add result, "nil"
|
||||||
return
|
return
|
||||||
add result, reprPointer(cast[pointer](s)) & "\""
|
add result, reprPointer(cast[pointer](s)) & "\""
|
||||||
for i in 0.. <len:
|
for i in 0 .. pred(len):
|
||||||
let c = s[i]
|
let c = s[i]
|
||||||
case c
|
case c
|
||||||
of '"': add result, "\\\""
|
of '"': add result, "\\\""
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ var
|
||||||
workersData: array[NumThreads, Worker]
|
workersData: array[NumThreads, Worker]
|
||||||
|
|
||||||
proc setup() =
|
proc setup() =
|
||||||
for i in 0.. <NumThreads:
|
for i in 0 ..< NumThreads:
|
||||||
workersData[i].taskArrived = createCondVar()
|
workersData[i].taskArrived = createCondVar()
|
||||||
workersData[i].taskStarted = createFastCondVar()
|
workersData[i].taskStarted = createFastCondVar()
|
||||||
createThread(workers[i], slave, addr(workersData[i]))
|
createThread(workers[i], slave, addr(workersData[i]))
|
||||||
|
|
|
||||||
|
|
@ -429,7 +429,7 @@ proc toSexp(x: NimNode): NimNode {.compiletime.} =
|
||||||
case x.kind
|
case x.kind
|
||||||
of nnkBracket:
|
of nnkBracket:
|
||||||
result = newNimNode(nnkBracket)
|
result = newNimNode(nnkBracket)
|
||||||
for i in 0 .. <x.len:
|
for i in 0 ..< x.len:
|
||||||
result.add(toSexp(x[i]))
|
result.add(toSexp(x[i]))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue