From 5ce77b3465434e396aa2d7670138a7e7741f3dae Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 19 May 2004 12:45:38 +0000 Subject: [PATCH] 0.8.10.36: Fix the NIL-as-keyword argument bug for local calls. --- NEWS | 2 ++ src/compiler/locall.lisp | 4 ++-- tests/compiler.impure.lisp | 11 ++++++++++- version.lisp-expr | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index f77510e..1a13633 100644 --- a/NEWS +++ b/NEWS @@ -2466,6 +2466,8 @@ changes in sbcl-0.8.11 relative to sbcl-0.8.10: it so. (thanks to Markus Ziegler) ** on the Alpha, the compiler succeeds in compiling functions returning a known number of arguments greater than 63. + ** fixed handling of invalid NIL arguments in keyword position + in local calls. planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/compiler/locall.lisp b/src/compiler/locall.lisp index d26584f..fa366db 100644 --- a/src/compiler/locall.lisp +++ b/src/compiler/locall.lisp @@ -632,7 +632,7 @@ (progn (ignores dummy val) (unless (eq name :allow-other-keys) - (setq loser name)))) + (setq loser (list name))))) (let ((info (lambda-var-arg-info var))) (when (eq (arg-info-key info) name) (ignores dummy) @@ -641,7 +641,7 @@ (when (and loser (not (optional-dispatch-allowp fun)) (not allowp)) (compiler-warn "function called with unknown argument keyword ~S" - loser) + (car loser)) (setf (basic-combination-kind call) :error) (return-from convert-more-call))) diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index 33936a5..f94e582 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -893,7 +893,7 @@ ;;;; MUFFLE-CONDITIONS test (corresponds to the test in the manual) (defvar *compiler-note-count* 0) -#-alpha ; KLUDGE +#-alpha ; FIXME: make a better test! (handler-bind ((sb-ext:compiler-note (lambda (c) (declare (ignore c)) (incf *compiler-note-count*)))) @@ -910,6 +910,15 @@ (assert (= *compiler-note-count* 1)) (assert (equal (multiple-value-list (funcall fun 1)) '(5 -5))))) +(handler-case + (eval '(flet ((%f (&key) nil)) (%f nil nil))) + (error (c) :good) + (:no-error (val) (error "no error: ~S" val))) +(handler-case + (eval '(labels ((%f (&key x) x)) (%f nil nil))) + (error (c) :good) + (:no-error (val) (error "no error: ~S" val))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself diff --git a/version.lisp-expr b/version.lisp-expr index bd602f0..40ca123 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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".) -"0.8.10.35" +"0.8.10.36" -- 1.7.10.4