prepare Nim codebase for upcoming parser changes

This commit is contained in:
Andreas Rumpf 2016-07-15 12:56:03 +02:00
commit 0834cd63d9
26 changed files with 46 additions and 46 deletions

View file

@ -90,13 +90,13 @@ when defined(nativeStacktrace) and nativeStackTraceSupported:
when not hasThreadSupport:
var
tempAddresses: array [0..127, pointer] # should not be alloc'd on stack
tempAddresses: array[0..127, pointer] # should not be alloc'd on stack
tempDlInfo: TDl_info
proc auxWriteStackTraceWithBacktrace(s: var string) =
when hasThreadSupport:
var
tempAddresses: array [0..127, pointer] # but better than a threadvar
tempAddresses: array[0..127, pointer] # but better than a threadvar
tempDlInfo: TDl_info
# This is allowed to be expensive since it only happens during crashes
# (but this way you don't need manual stack tracing)
@ -124,12 +124,12 @@ when defined(nativeStacktrace) and nativeStackTraceSupported:
when not hasThreadSupport:
var
tempFrames: array [0..127, PFrame] # should not be alloc'd on stack
tempFrames: array[0..127, PFrame] # should not be alloc'd on stack
proc auxWriteStackTrace(f: PFrame, s: var string) =
when hasThreadSupport:
var
tempFrames: array [0..127, PFrame] # but better than a threadvar
tempFrames: array[0..127, PFrame] # but better than a threadvar
const
firstCalls = 32
var
@ -250,7 +250,7 @@ proc raiseExceptionAux(e: ref Exception) =
inc L, slen
template add(buf, s: expr) =
xadd(buf, s, s.len)
var buf: array [0..2000, char]
var buf: array[0..2000, char]
var L = 0
add(buf, "Error: unhandled exception: ")
if not isNil(e.msg): add(buf, e.msg)