summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-08-06 17:39:44 +0200
committerAndy Wingo <wingo@pobox.com>2010-08-06 17:39:51 +0200
commit3d4f8e3c2dd917bee6c5a55be3349234211faab1 (patch)
tree8e560338d70b531daa5eca3430321bb4ac432b20
parent5bc97ad5dd7baa1d9f19571fed0fe6a339ed0688 (diff)
downloadguile-3d4f8e3c2dd917bee6c5a55be3349234211faab1.tar.gz
fix stack narrowing for tail-call to throw
* module/system/repl/debug.scm (narrow-stack->vector): Fix for the tail-call to `throw' case, as in `(quit)'.
-rw-r--r--module/system/repl/debug.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/system/repl/debug.scm b/module/system/repl/debug.scm
index 01b1b4cec..293b790fa 100644
--- a/module/system/repl/debug.scm
+++ b/module/system/repl/debug.scm
@@ -195,7 +195,11 @@
v))
(define (narrow-stack->vector stack . args)
- (stack->vector (apply make-stack (stack-ref stack 0) args)))
+ (let ((narrowed (apply make-stack (stack-ref stack 0) args)))
+ (if narrowed
+ (stack->vector narrowed)
+ #()))) ; ? Can be the case for a tail-call to `throw' tho
+
;; (define (debug)
;; (run-debugger