diff options
author | Araq <rumpf_a@web.de> | 2013-12-29 01:13:51 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-12-29 01:13:51 +0100 |
commit | 438703f59e4d226f6e83e78c4f549a381526c6c2 (patch) | |
tree | dd13f0b882482e51f513cbbcb0ce292a66098c09 /lib/system | |
parent | 1101a40f91880b6cd1f0807d2b272eda7b5c9491 (diff) | |
download | Nim-438703f59e4d226f6e83e78c4f549a381526c6c2.tar.gz |
case consistency: next steps
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/assign.nim | 2 | ||||
-rw-r--r-- | lib/system/chcks.nim | 2 | ||||
-rw-r--r-- | lib/system/gc.nim | 14 | ||||
-rw-r--r-- | lib/system/sysio.nim | 10 |
4 files changed, 14 insertions, 14 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim index 9e3930622..bed8820be 100644 --- a/lib/system/assign.nim +++ b/lib/system/assign.nim @@ -144,7 +144,7 @@ proc objectInitAux(dest: pointer, n: ptr TNimNode) = var d = cast[TAddress](dest) case n.kind of nkNone: sysAssert(false, "objectInitAux") - of nkSLot: objectInit(cast[pointer](d +% n.offset), n.typ) + of nkSlot: objectInit(cast[pointer](d +% n.offset), n.typ) of nkList: for i in 0..n.len-1: objectInitAux(dest, n.sons[i]) diff --git a/lib/system/chcks.nim b/lib/system/chcks.nim index eb1bf752e..f29e222e8 100644 --- a/lib/system/chcks.nim +++ b/lib/system/chcks.nim @@ -10,7 +10,7 @@ # Implementation of some runtime checks. proc raiseRangeError(val: BiggestInt) {.compilerproc, noreturn, noinline.} = - when hostOs == "standalone": + when hostOS == "standalone": sysFatal(EOutOfRange, "value out of range") else: sysFatal(EOutOfRange, "value out of range: ", $val) diff --git a/lib/system/gc.nim b/lib/system/gc.nim index 376d1502c..6d6be33d0 100644 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -573,7 +573,7 @@ proc scan(s: PCell) = proc collectWhite(s: PCell) = if s.color == rcWhite and s notin gch.cycleRoots: - s.setcolor(rcBlack) + s.setColor(rcBlack) forAllChildren(s, waCollectWhite) freeCyclicCell(gch, s) @@ -891,7 +891,7 @@ proc collectZCT(gch: var TGcHeap): bool = const workPackage = 100 var L = addr(gch.zct.len) - when withRealtime: + when withRealTime: var steps = workPackage var t0: TTicks if gch.maxPause > 0: t0 = getticks() @@ -904,7 +904,7 @@ proc collectZCT(gch: var TGcHeap): bool = c.refcount = c.refcount and not ZctFlag gch.zct.d[0] = gch.zct.d[L[] - 1] dec(L[]) - when withRealtime: dec steps + when withRealTime: dec steps if c.refcount <% rcIncrement: # It may have a RC > 0, if it is in the hardware stack or # it has not been removed yet from the ZCT. This is because @@ -927,7 +927,7 @@ proc collectZCT(gch: var TGcHeap): bool = else: sysAssert(c.typ != nil, "collectZCT 2") zeroMem(c, sizeof(TCell)) - when withRealtime: + when withRealTime: if steps == 0: steps = workPackage if gch.maxPause > 0: @@ -952,7 +952,7 @@ proc unmarkStackAndRegisters(gch: var TGcHeap) = gch.decStack.len = 0 proc collectCTBody(gch: var TGcHeap) = - when withRealtime: + when withRealTime: let t0 = getticks() sysAssert(allocInv(gch.region), "collectCT: begin") @@ -975,7 +975,7 @@ proc collectCTBody(gch: var TGcHeap) = unmarkStackAndRegisters(gch) sysAssert(allocInv(gch.region), "collectCT: end") - when withRealtime: + when withRealTime: let duration = getticks() - t0 gch.stat.maxPause = max(gch.stat.maxPause, duration) when defined(reportMissedDeadlines): @@ -997,7 +997,7 @@ proc collectCT(gch: var TGcHeap) = markForDebug(gch) collectCTBody(gch) -when withRealtime: +when withRealTime: proc toNano(x: int): TNanos {.inline.} = result = x * 1000 diff --git a/lib/system/sysio.nim b/lib/system/sysio.nim index 2b6ad8df1..56e6a9e5f 100644 --- a/lib/system/sysio.nim +++ b/lib/system/sysio.nim @@ -95,7 +95,7 @@ proc write(f: TFile, i: int) = fprintf(f, "%ld", i) proc write(f: TFile, i: BiggestInt) = - when sizeof(Biggestint) == 8: + when sizeof(BiggestInt) == 8: fprintf(f, "%lld", i) else: fprintf(f, "%ld", i) @@ -235,17 +235,17 @@ proc fwrite(buf: pointer, size, n: int, f: TFile): int {. proc readBuffer(f: TFile, buffer: pointer, len: int): int = result = fread(buffer, 1, len, f) -proc readBytes(f: TFile, a: var openarray[int8], start, len: int): int = +proc readBytes(f: TFile, a: var openArray[int8], start, len: int): int = result = readBuffer(f, addr(a[start]), len) -proc readChars(f: TFile, a: var openarray[char], start, len: int): int = +proc readChars(f: TFile, a: var openArray[char], start, len: int): int = result = readBuffer(f, addr(a[start]), len) {.push stackTrace:off, profiler:off.} -proc writeBytes(f: TFile, a: openarray[int8], start, len: int): int = +proc writeBytes(f: TFile, a: openArray[int8], start, len: int): int = var x = cast[ptr array[0..1000_000_000, int8]](a) result = writeBuffer(f, addr(x[start]), len) -proc writeChars(f: TFile, a: openarray[char], start, len: int): int = +proc writeChars(f: TFile, a: openArray[char], start, len: int): int = var x = cast[ptr array[0..1000_000_000, int8]](a) result = writeBuffer(f, addr(x[start]), len) proc writeBuffer(f: TFile, buffer: pointer, len: int): int = |