change system.nim to adhere to the style guide

This commit is contained in:
Araq 2018-10-30 15:01:57 +01:00
commit 5c25b93898

View file

@ -60,7 +60,7 @@ var
# list of exception handlers # list of exception handlers
# a global variable for the root of all try blocks # a global variable for the root of all try blocks
currException {.threadvar.}: ref Exception currException {.threadvar.}: ref Exception
raise_counter {.threadvar.}: uint raiseCounter {.threadvar.}: uint
gcFramePtr {.threadvar.}: GcFrame gcFramePtr {.threadvar.}: GcFrame
@ -122,12 +122,12 @@ proc popCurrentException {.compilerRtl, inl.} =
proc popCurrentExceptionEx(id: uint) {.compilerRtl.} = proc popCurrentExceptionEx(id: uint) {.compilerRtl.} =
# in cpp backend exceptions can pop-up in the different order they were raised, example #5628 # in cpp backend exceptions can pop-up in the different order they were raised, example #5628
if currException.raise_id == id: if currException.raiseId == id:
currException = currException.up currException = currException.up
else: else:
var cur = currException.up var cur = currException.up
var prev = currException var prev = currException
while cur != nil and cur.raise_id != id: while cur != nil and cur.raiseId != id:
prev = cur prev = cur
cur = cur.up cur = cur.up
if cur == nil: if cur == nil:
@ -345,10 +345,10 @@ proc raiseExceptionAux(e: ref Exception) =
quitOrDebug() quitOrDebug()
else: else:
pushCurrentException(e) pushCurrentException(e)
raise_counter.inc raiseCounter.inc
if raise_counter == 0: if raiseCounter == 0:
raise_counter.inc # skip zero at overflow raiseCounter.inc # skip zero at overflow
e.raise_id = raise_counter e.raiseId = raiseCounter
{.emit: "`e`->raise();".} {.emit: "`e`->raise();".}
else: else:
if excHandler != nil: if excHandler != nil: