[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, syncase-in-boot-9, updated. 1351c2dba5

From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, syncase-in-boot-9, updated. 1351c2dba5ce54aeeae41cb2322ad39cd29510b0
Date: Tue, 26 May 2009 19:52:39 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

The branch, syncase-in-boot-9 has been updated
       via  1351c2dba5ce54aeeae41cb2322ad39cd29510b0 (commit)
      from  9d07bb7276d1be078c5933645897694035ecdcfe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1351c2dba5ce54aeeae41cb2322ad39cd29510b0
Author: Andy Wingo <address@hidden>
Date:   Tue May 26 21:47:45 2009 +0200

    fix backtraces with compiled boot-9
    * module/ice-9/boot-9.scm (default-pre-unwind-handler): Since we were
      tail-called by pre-unwind-handler-dispatch, we can't use
      pre-unwind-handler-dispatch as a narrowing argument. Instead just
      narrow by one frame.
      (pre-unwind-handler-dispatch): Deprecate.
      (error-catching-loop): Remove crack comment and code, and just use
      default-pre-unwind-handler as our pre-unwind handler.
    * module/ice-9/stack-catch.scm (stack-catch):
    * module/system/repl/repl.scm (call-with-backtrace): Use
      default-pre-unwind-handler directly.


Summary of changes:
 module/ice-9/boot-9.scm      |   17 +++++------------
 module/ice-9/stack-catch.scm |    2 +-
 module/system/repl/repl.scm  |    2 +-
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index fa05de6..26ce1a9 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -2443,11 +2443,12 @@ module '(ice-9 q) '(make-q q-length))}."
 (define (set-repl-prompt! v) (set! scm-repl-prompt v))
 (define (default-pre-unwind-handler key . args)
-  (save-stack pre-unwind-handler-dispatch)
+  (save-stack 1)
   (apply throw key args))
-(define (pre-unwind-handler-dispatch key . args)
-  (apply default-pre-unwind-handler key args))
+ (define (pre-unwind-handler-dispatch key . args)
+   (apply default-pre-unwind-handler key args)))
 (define abort-hook (make-hook))
@@ -2524,15 +2525,7 @@ module '(ice-9 q) '(make-q q-length))}."
                                  (apply bad-throw key args)))))))
-                   ;; Note that having just `pre-unwind-handler-dispatch'
-                   ;; here is connected with the mechanism that
-                   ;; produces a nice backtrace upon error.  If, for
-                   ;; example, this is replaced with (lambda args
-                   ;; (apply pre-unwind-handler-dispatch args)), the stack
-                   ;; cutting (in save-stack) goes wrong and ends up
-                   ;; saving no stack at all, so there is no
-                   ;; backtrace.
-                   pre-unwind-handler-dispatch)))
+                    default-pre-unwind-handler)))
        (if next (loop next) status)))
     (set! set-batch-mode?! (lambda (arg)
diff --git a/module/ice-9/stack-catch.scm b/module/ice-9/stack-catch.scm
index 2f4b3d1..a542676 100644
--- a/module/ice-9/stack-catch.scm
+++ b/module/ice-9/stack-catch.scm
@@ -40,4 +40,4 @@ this call to @code{catch}."
   (catch key
-        pre-unwind-handler-dispatch))
+        default-pre-unwind-handler))
diff --git a/module/system/repl/repl.scm b/module/system/repl/repl.scm
index ebf2b93..0a06e3d 100644
--- a/module/system/repl/repl.scm
+++ b/module/system/repl/repl.scm
@@ -89,7 +89,7 @@
   (catch #t
          (lambda () (%start-stack #t thunk))
-         pre-unwind-handler-dispatch))
+         default-pre-unwind-handler))
 (define-macro (with-backtrace form)
   `(call-with-backtrace (lambda () ,form)))

GNU Guile

reply via email to

[Prev in Thread] Current Thread [Next in Thread]