strictly-monotonic functions. (lp#975528)
* bug fix: copy-tree caused stack exhaustion on long linear lists, and now
it's also slightly faster. (lp#998926)
+ * bug fix: better error messages for malformed IGNORE declarations.
+ (lp#1000239)
* documentation:
** improved docstrings: REPLACE (lp#965592)
;;; like FIND-IN-BINDINGS, but looks for #'FOO in the FVARS
(defun find-in-bindings-or-fbindings (name vars fvars)
(declare (list vars fvars))
- (if (consp name)
- (destructuring-bind (wot fn-name) name
- (unless (eq wot 'function)
- (compiler-error "The function or variable name ~S is unrecognizable."
- name))
- (find fn-name fvars :key #'leaf-source-name :test #'equal))
- (find-in-bindings vars name)))
+ (typecase name
+ (atom
+ (find-in-bindings vars name))
+ ((cons (eql function) (cons * null))
+ (find (cadr name) fvars :key #'leaf-source-name :test #'equal))
+ (t
+ (compiler-error "Malformed function or variable name ~S." name))))
;;; Process an ignore/ignorable declaration, checking for various losing
;;; conditions.
,@(loop for i from 27 to 32
collect (expt 2 i)))))))
(assert (every #'plusp (funcall f #'list)))))
+
+(with-test (:name (:malformed-ignore :lp-1000239))
+ (raises-error?
+ (eval '(lambda () (declare (ignore (function . a)))))
+ sb-int:compiled-program-error)
+ (raises-error?
+ (eval '(lambda () (declare (ignore (function a b)))))
+ sb-int:compiled-program-error)
+ (raises-error?
+ (eval '(lambda () (declare (ignore (function)))))
+ sb-int:compiled-program-error)
+ (raises-error?
+ (eval '(lambda () (declare (ignore (a)))))
+ sb-int:compiled-program-error)
+ (raises-error?
+ (eval '(lambda () (declare (ignorable (a b)))))
+ sb-int:compiled-program-error))