1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; While most of SBCL is derived from the CMU CL system, the test
5 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; This software is in the public domain and is provided with
9 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
10 ;;;; more information.
14 ;;; Check for fbound external symbols in public packages that have no
15 ;;; argument list information. (This can happen if we get carried away
16 ;;; with byte compilation, since at least in sbcl-0.6.12 the byte
17 ;;; compiler can't record argument list information.)
18 (defvar *public-package-names*
19 '("SB-ALIEN" "SB-C-CALL" "SB-DEBUG" "SB-EXT" "SB-EXT""SB-GRAY" "SB-MP"
20 "SB-PROFILE" "SB-PCL" "COMMON-LISP"))
21 (defun has-arglist-info-p (function)
22 (and (not (typep function 'sb-c::byte-function))
23 (sb-kernel:%function-arglist function)))
24 (defun check-ext-symbols-arglist (package)
25 (format t "~% Looking at Package: ~A" package)
26 (do-external-symbols (ext-sym package)
27 (when (fboundp ext-sym)
28 (let ((fun (symbol-function ext-sym)))
29 (unless (has-arglist-info-p fun)
30 (error "~%Function ~A (~A) has no argument-list information available, ~%~
31 and is probably byte-compiled.~%" ext-sym fun))))))
32 (dolist (public-package *public-package-names*)
33 (when (find-package public-package)
34 (check-ext-symbols-arglist public-package)))