but assumed or declared function as well.
* improvement: recompilation of systems using SB-GROVEL now works
(thanks to Leslie Polzer)
- * improvement: SB-CLTL2 functions DECLARATION-INFORMATION, PARSE-MACRO,
- and ENCLOSE have been documented (thanks to Larry D'Anna)
+ * improvements to SB-CLTL2 (thanks to Larry D'Anna):
+ ** functions DECLARATION-INFORMATION, PARSE-MACRO, and ENCLOSE have been
+ documented.
+ ** DECLARATION-INFORMATION now supports declaration name DECLARATION as
+ well.
* bug fix: the low-level debugger had 32-bit assumptions and was missing
information about some array types. (thanks to Luis Oliveira)
* bug fix: moderately complex combinations of inline expansions could
(in-package :sb-cltl2)
#| TODO:
-declaration-information
augment-environment
define-declaration
(map-environment)
(defun declaration-information (declaration-name &optional env)
"Return information about declarations named by DECLARATION-NAME.
-If DECLARATION-NAME is optimize return a list who's entries are of the
-form (quality value).
+If DECLARATION-NAME is OPTIMIZE return a list who's entries are of the
+form \(QUALITY VALUE).
+
+If DECLARATION-NAME is DECLARATION return a list of declaration names that
+have been proclaimed as valid.
If DECLARATION-NAME is SB-EXT:MUFFLE-CONDITIONS return a type specifier for
the condition types that have been muffled."
(sb-ext:muffle-conditions
(car (rassoc 'muffle-warning
(sb-c::lexenv-handled-conditions env))))
+ (declaration
+ ;; FIXME: This is a bit too deep in the guts of INFO for comfort...
+ (let ((type (sb-c::type-info-number
+ (sb-c::type-info-or-lose :declaration :recognized)))
+ (ret nil))
+ (dolist (env *info-environment*)
+ (do-info (env :name name :type-number num :value value)
+ (when (and (= num type) value)
+ (push name ret))))
+ ret))
(t (error "Unsupported declaration ~S." declaration-name)))))
(defun parse-macro (name lambda-list body &optional env)
(subtypep '(and warning (not style-warning)) dinfo)))))))
t)
+
+(declaim (declaration fubar))
+
+(deftest declaration-information.declaration
+ (if (member 'fubar (declaration-information 'declaration)) 'yay)
+ yay)
+
;;;; VARIABLE-INFORMATION
(defvar *foo*)
;;; 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.30.14"
+"1.0.30.15"