1.0.17.18: handlers with non-required arguments (regression 1.0.17.8)
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 2 Jun 2008 13:31:39 +0000 (13:31 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 2 Jun 2008 13:31:39 +0000 (13:31 +0000)
 * DX-FLET doesn't currently handle non-required arguments, so don't
   use it when there are any.

 * Test-case.

src/code/defboot.lisp
tests/compiler.pure.lisp
version.lisp-expr

index f36232b..b2189a4 100644 (file)
@@ -580,7 +580,9 @@ evaluated as a PROGN."
                                                           (consp (cdr handler))
                                                           (consp (cadr handler))
                                                           (prog1 (eq 'lambda (caadr handler))
-                                                            (setf lambda-form (cadr handler))))))
+                                                            (setf lambda-form (cadr handler)))))
+                                                 ;; KLUDGE: DX-FLET doesn't handle non-required arguments yet.
+                                                 (not (intersection (second lambda-form) lambda-list-keywords)))
                                             (let ((name (gensym "LAMBDA")))
                                               (push `(,name ,@(cdr lambda-form)) local-funs)
                                               (list type `(function ,name)))
index f14cbdf..a1c0ee8 100644 (file)
                      (%zig (the (values (single-float (0.0) 1.0) &optional) (unknown2)))
                      nil))))
              (%zig))))
+
+;;; non-required arguments in HANDLER-BIND
+(assert (eq :oops (car (funcall (compile nil
+                                         '(lambda (x)
+                                           (block nil
+                                             (handler-bind ((error (lambda (&rest args) (return (cons :oops args)))))
+                                               (/ 2 x)))))
+                                0))))
index bb50474..b6f8141 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.17.17"
+"1.0.17.18"