X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fparse-defmacro.lisp;h=48576799bb5dae3ce8dfab57388e79fd9c0d5876;hb=6caf3ed5713773cb423f46bf40a29f2438c97c78;hp=fe30d12fd5069cd81e6b64619faff118608da98d;hpb=cd08dc8fd4d4b77fdbe87addb06e97cde247bbf9;p=sbcl.git diff --git a/src/code/parse-defmacro.lisp b/src/code/parse-defmacro.lisp index fe30d12..4857679 100644 --- a/src/code/parse-defmacro.lisp +++ b/src/code/parse-defmacro.lisp @@ -39,6 +39,9 @@ ((:default-default *default-default*)) (error-fun 'error) (wrap-block t)) + (unless (listp lambda-list) + (bad-type lambda-list 'list "~S lambda-list is not a list: ~S" + context lambda-list)) (multiple-value-bind (forms declarations documentation) (parse-body body :doc-string-allowed doc-string-allowed) (let ((*arg-tests* ()) @@ -51,6 +54,8 @@ :error-fun error-fun :anonymousp anonymousp) (values `(let* (,@(nreverse *system-lets*)) + #-sb-xc-host + (declare (muffle-conditions sb!ext:code-deletion-note)) ,@(when *ignorable-vars* `((declare (ignorable ,@*ignorable-vars*)))) ,@*arg-tests* @@ -91,7 +96,7 @@ (aux-seen nil) (optional-seen nil) ;; ANSI specifies that dotted lists are "treated exactly as if the - ;; parameter name that ends the list had appeared preceded by &rest." + ;; parameter name that ends the list had appeared preceded by &REST." ;; We force this behavior by transforming dotted lists into ordinary ;; lists with explicit &REST elements. (lambda-list (do ((in-pdll possibly-dotted-lambda-list (cdr in-pdll)) @@ -106,14 +111,14 @@ (error "&WHOLE may only appear first in ~S lambda-list." context)) ;; Special case compiler-macros: if car of the form is FUNCALL, ;; skip over it for destructuring, pretending cdr of the form is - ;; the actual form. Save original for &whole - (when (eq context 'define-compiler-macro) + ;; the actual form. Save original for &WHOLE. + (when (and (not sublist) (eq context 'define-compiler-macro)) (push-let-binding compiler-macro-whole whole-var :system t) (push compiler-macro-whole *ignorable-vars*) (push-let-binding whole-var whole-var :system t :when `(not (eq 'funcall (car ,whole-var))) - ;; do we need to SETF too? + ;; Do we need to SETF too? :else `(setf ,whole-var (cdr ,whole-var)))) (do ((rest-of-lambda-list lambda-list (cdr rest-of-lambda-list))) ((null rest-of-lambda-list)) @@ -319,8 +324,7 @@ :maximum ,explicit-maximum)))))) *arg-tests*)) (when key-seen - (let ((problem (gensym "KEY-PROBLEM-")) - (info (gensym "INFO-"))) + (with-unique-names (problem info) (push `(multiple-value-bind (,problem ,info) (verify-keywords ,rest-name ',keys