guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-3-52-g5b2


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-3-52-g5b2f2c7
Date: Fri, 02 Oct 2009 08:30:32 +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".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=5b2f2c75527c5899648eec46c7eca0f57420ff3b

The branch, master has been updated
       via  5b2f2c75527c5899648eec46c7eca0f57420ff3b (commit)
      from  187a43907f75265b504116aa1e96b40d57f4aa88 (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 5b2f2c75527c5899648eec46c7eca0f57420ff3b
Author: Ludovic Courtès <address@hidden>
Date:   Fri Oct 2 10:26:30 2009 +0200

    Fix the argument list of gsubr stack frames.
    
    This fixes a bug introduced in e20d7001c3f7150400169fecb0bf0eefdf122fe2
    and reported by Neil.
    
    * libguile/eval.i.c (CEVAL)[DEVAL]: Don't duplicate ARG1 in
      `debug.info->a.args' for gsubr stack frames.
      (scm_apply): Likewise.
    
    * test-suite/tests/eval.test ("stacks")["arguments of a gsubr stack
      frame"]: New test.

-----------------------------------------------------------------------

Summary of changes:
 libguile/eval.i.c          |    4 ++--
 test-suite/tests/eval.test |   25 ++++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/libguile/eval.i.c b/libguile/eval.i.c
index 25abf6c..1d1c180 100644
--- a/libguile/eval.i.c
+++ b/libguile/eval.i.c
@@ -1259,7 +1259,7 @@ dispatch:
            RETURN (SCM_SMOB_APPLY_1 (proc, arg1));
          case scm_tc7_gsubr:
 #ifdef DEVAL
-           debug.info->a.args = scm_cons (arg1, debug.info->a.args);
+           debug.info->a.args = debug.info->a.args;
            debug.info->a.proc = proc;
 #endif
            RETURN (scm_i_gsubr_apply (proc, arg1, SCM_UNDEFINED));
@@ -1896,7 +1896,7 @@ tail:
 #ifdef DEVAL
       args = (SCM_UNBNDP(arg1) ? SCM_EOL : debug.vect[0].a.args);
       debug.vect[0].a.proc = proc;
-      debug.vect[0].a.args = scm_cons (arg1, args);
+      debug.vect[0].a.args = args;
 #else
       args = (SCM_UNBNDP(arg1) ? SCM_EOL : scm_cons (arg1, args));
 #endif
diff --git a/test-suite/tests/eval.test b/test-suite/tests/eval.test
index 47d7ca9..a428a07 100644
--- a/test-suite/tests/eval.test
+++ b/test-suite/tests/eval.test
@@ -382,7 +382,30 @@
                                             hashq-ref)))
                                 frames)))))))
         (lambda (key result)
-          (= 1 result))))))
+          (= 1 result))))
+
+    (pass-if "arguments of a gsubr stack frame"
+      ;; Create a stack with two gsubr frames and make sure the arguments are
+      ;; correct.
+      (catch 'result
+        (lambda ()
+          (start-stack 'foo
+            (lazy-catch 'wrong-type-arg
+              (lambda ()
+                ;; Trigger a `wrong-type-arg' exception.
+                (substring 'wrong 'type 'arg))
+              (lambda _
+                (let* ((stack  (make-stack #t))
+                       (frames (stack->frames stack)))
+                  (throw 'result
+                         (map (lambda (frame)
+                                (cons (frame-procedure frame)
+                                      (frame-arguments frame)))
+                              frames)))))))
+        (lambda (key result)
+          (and (equal? (car result) `(,make-stack #t))
+               (pair? (member `(,substring  wrong type arg)
+                              (cdr result)))))))))
 
 ;;;
 ;;; letrec init evaluation


hooks/post-receive
-- 
GNU Guile




reply via email to

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