summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-22 15:28:41 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-23 22:03:15 +0100
commitc4d2cb9ea62108f08b7c5e4fee082c2802489642 (patch)
tree94c0cb156f7f1a9fb925ddc06e70ca7e069b1030 /lib
parent40d1c7d43a6459aedf1c64a7f5e145ebbe4badcb (diff)
downloadNim-c4d2cb9ea62108f08b7c5e4fee082c2802489642.tar.gz
excpt.nim: code cleanup, don't produce nimFrame in -d:release mode
Diffstat (limited to 'lib')
-rw-r--r--lib/system/excpt.nim36
1 files changed, 15 insertions, 21 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 2f41ad1e3..cc0c1f54b 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -446,27 +446,21 @@ when not defined(gcDestructors):
     ## a ``seq``. This is not yet available for the JS backend.
     shallowCopy(result, e.trace)
 
-when defined(nimRequiresNimFrame):
-  const nimCallDepthLimit {.intdefine.} = 2000
-
-  proc callDepthLimitReached() {.noinline.} =
-    writeStackTrace()
-    showErrorMessage("Error: call depth limit reached in a debug build (" &
-        $nimCallDepthLimit & " function calls). You can change it with " &
-        "-d:nimCallDepthLimit=<int> but really try to avoid deep " &
-        "recursions instead.\n")
-    quitOrDebug()
-
-  proc nimFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} =
-    s.calldepth = if framePtr == nil: 0 else: framePtr.calldepth+1
-    s.prev = framePtr
-    framePtr = s
-    if s.calldepth == nimCallDepthLimit: callDepthLimitReached()
-else:
-  proc pushFrame(s: PFrame) {.compilerRtl, inl, exportc: "nimFrame".} =
-    # XXX only for backwards compatibility
-    s.prev = framePtr
-    framePtr = s
+const nimCallDepthLimit {.intdefine.} = 2000
+
+proc callDepthLimitReached() {.noinline.} =
+  writeStackTrace()
+  showErrorMessage("Error: call depth limit reached in a debug build (" &
+      $nimCallDepthLimit & " function calls). You can change it with " &
+      "-d:nimCallDepthLimit=<int> but really try to avoid deep " &
+      "recursions instead.\n")
+  quitOrDebug()
+
+proc nimFrame(s: PFrame) {.compilerRtl, inl.} =
+  s.calldepth = if framePtr == nil: 0 else: framePtr.calldepth+1
+  s.prev = framePtr
+  framePtr = s
+  if s.calldepth == nimCallDepthLimit: callDepthLimitReached()
 
 when defined(endb):
   var