styleCheck: Fix some inconsistent identifiers (#16177)

This commit is contained in:
ee7 2020-12-21 18:41:56 +01:00 • committed by GitHub
commit 297c8e403d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 64 additions and 64 deletions

View file

@ -87,8 +87,8 @@ type
region: ptr MemRegion
var
tlRegion {.threadVar.}: MemRegion
# tempStrRegion {.threadVar.}: MemRegion # not yet used
tlRegion {.threadvar.}: MemRegion
# tempStrRegion {.threadvar.}: MemRegion # not yet used
template withRegion*(r: var MemRegion; body: untyped) =
let oldRegion = tlRegion
@ -437,5 +437,5 @@ proc getTotalMem*(r: MemRegion): int =
proc nimGC_setStackBottom(theStackBottom: pointer) = discard
proc nimGCref(x: pointer) {.compilerProc.} = discard
proc nimGCunref(x: pointer) {.compilerProc.} = discard
proc nimGCref(x: pointer) {.compilerproc.} = discard
proc nimGCunref(x: pointer) {.compilerproc.} = discard

View file

@ -130,8 +130,8 @@ proc growObj(old: pointer, newsize: int): pointer =
proc nimGCref(p: pointer) {.compilerproc, inline.} = discard
proc nimGCunref(p: pointer) {.compilerproc, inline.} = discard
proc nimGCunrefNoCycle(p: pointer) {.compilerProc, inline.} = discard
proc nimGCunrefRC1(p: pointer) {.compilerProc, inline.} = discard
proc nimGCunrefNoCycle(p: pointer) {.compilerproc, inline.} = discard
proc nimGCunrefRC1(p: pointer) {.compilerproc, inline.} = discard
proc nimGCvisit(d: pointer, op: int) {.compilerRtl.} = discard
proc unsureAsgnRef(dest: PPointer, src: pointer) {.compilerproc, inline.} =

View file

@ -191,7 +191,7 @@ template checkOsError =
template log(msg: string, body: untyped) =
if mode in {ScriptMode.Verbose, ScriptMode.Whatif}:
echo "[NimScript] ", msg
if mode != ScriptMode.WhatIf:
if mode != ScriptMode.Whatif:
body
proc listDirs*(dir: string): seq[string] =

View file

@ -80,22 +80,22 @@ proc signal(cv: var FastCondVar) =
signal(cv.slow)
type
Barrier* {.compilerProc.} = object
Barrier* {.compilerproc.} = object
counter: int
cv: CondVar
proc barrierEnter*(b: ptr Barrier) {.compilerProc.} =
proc barrierEnter*(b: ptr Barrier) {.compilerproc.} =
atomicInc b.counter
proc barrierLeave*(b: ptr Barrier) {.compilerProc.} =
proc barrierLeave*(b: ptr Barrier) {.compilerproc.} =
atomicDec b.counter
if b.counter <= 0: signal(b.cv)
proc openBarrier*(b: ptr Barrier) {.compilerProc.} =
proc openBarrier*(b: ptr Barrier) {.compilerproc.} =
b.counter = 0
b.cv = createCondVar()
proc closeBarrier*(b: ptr Barrier) {.compilerProc.} =
proc closeBarrier*(b: ptr Barrier) {.compilerproc.} =
await(b.cv)
destroyCondVar(b.cv)
@ -113,7 +113,7 @@ type
data: pointer
ready: bool # put it here for correct alignment!
proc nimArgsPassingDone(p: pointer) {.compilerProc.} =
proc nimArgsPassingDone(p: pointer) {.compilerproc.} =
let w = cast[ptr Worker](p)
signal(w.taskStarted)
@ -167,7 +167,7 @@ template spawnX*(call: typed) =
if preferSpawn(): spawn call
else: call
proc nimSpawn(fn: WorkerProc; data: pointer) {.compilerProc.} =
proc nimSpawn(fn: WorkerProc; data: pointer) {.compilerproc.} =
# implementation of 'spawn' that is used by the code generator.
while true:
for i in 0.. high(workers):