diff options
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/embedded.nim | 2 | ||||
-rw-r--r-- | lib/system/excpt.nim | 14 | ||||
-rw-r--r-- | lib/system/inclrtl.nim | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/lib/system/embedded.nim b/lib/system/embedded.nim index 85fe17f8d..661992e81 100644 --- a/lib/system/embedded.nim +++ b/lib/system/embedded.nim @@ -15,7 +15,7 @@ proc chckRange(i, a, b: int): int {.inline, compilerproc.} proc chckRangeF(x, a, b: float): float {.inline, compilerproc.} proc chckNil(p: pointer) {.inline, compilerproc.} -proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = discard +proc nimFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = discard proc popFrame {.compilerRtl, inl.} = discard proc setFrame(s: PFrame) {.compilerRtl, inl.} = discard diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 612a9e729..2dc134eaf 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -44,9 +44,15 @@ var # a global variable for the root of all try blocks currException {.rtlThreadVar.}: ref E_Base -proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = - s.prev = framePtr - framePtr = s +when defined(nimRequiresNimFrame): + proc nimFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = + s.prev = framePtr + framePtr = s +else: + proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} = + # XXX only for backwards compatibility + s.prev = framePtr + framePtr = s proc popFrame {.compilerRtl, inl.} = framePtr = framePtr.prev @@ -71,7 +77,7 @@ proc popCurrentException {.compilerRtl, inl.} = # some platforms have native support for stack traces: const - nativeStackTraceSupported = (defined(macosx) or defined(linux)) and + nativeStackTraceSupported* = (defined(macosx) or defined(linux)) and not nimrodStackTrace hasSomeStackTrace = nimrodStackTrace or defined(nativeStackTrace) and nativeStackTraceSupported diff --git a/lib/system/inclrtl.nim b/lib/system/inclrtl.nim index 475a09686..5c82db4da 100644 --- a/lib/system/inclrtl.nim +++ b/lib/system/inclrtl.nim @@ -1,7 +1,7 @@ # # # Nimrod's Runtime Library -# (c) Copyright 2013 Andreas Rumpf +# (c) Copyright 2014 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. @@ -30,9 +30,9 @@ when defined(createNimRtl): {.pragma: inl.} {.pragma: compilerRtl, compilerproc, exportc: "nimrtl_$1", dynlib.} elif defined(useNimRtl): - when hostOS == "windows": + when defined(windows): const nimrtl* = "nimrtl.dll" - elif hostOS == "macosx": + elif defined(macosx): const nimrtl* = "nimrtl.dylib" else: const nimrtl* = "libnimrtl.so" |