* Most importantly, keep the symbols around for a while, since otherwise reading
code that tries to twiddle them causes a package-lock violation.
* Make it a refence condition for good measure.
* Prettify the output in from other policy-related warnings while at it.
"SIMPLE-READER-ERROR"
"SIMPLE-READER-PACKAGE-ERROR"
"SIMPLE-REFERENCE-ERROR"
+ "SIMPLE-REFERENCE-WARNING"
"SIMPLE-STREAM-ERROR"
"SIMPLE-STORAGE-CONDITION"
"SIMPLE-STYLE-WARNING"
(define-condition simple-reference-error (reference-condition simple-error)
())
+(define-condition simple-reference-warning (reference-condition simple-warning)
+ ())
+
(define-condition duplicate-definition (reference-condition warning)
((name :initarg :name :reader duplicate-definition-name))
(:report (lambda (c s)
(or (memq x *policy-qualities*)
(assq x *policy-dependent-qualities*)))
+;;; Is it deprecated?
+(defun policy-quality-deprecation-warning (quality spec)
+ (when (member quality '(stack-allocate-dynamic-extent stack-allocate-vector
+ stack-allocate-value-cells))
+ (make-instance 'simple-reference-warning
+ :format-control "~@<Ignoring deprecated optimization quality ~S in:~_ ~S~:>"
+ :format-arguments (list quality spec)
+ :references (list '(:sbcl :variable *stack-allocate-dynamic-extent*)
+ '(:sbcl :node "Dynamic-extent allocation")))))
+
;;; *POLICY* holds the current global compiler policy information, as
;;; an alist mapping from optimization quality name to quality value.
;;; Inside the scope of declarations, new entries are added at the
(destructuring-bind (quality raw-value) q-and-v-or-just-q
(values quality raw-value)))
(cond ((not (policy-quality-name-p quality))
- (compiler-warn "ignoring unknown optimization quality ~
- ~S in ~S"
- quality spec))
+ (let ((deprecation-warning (policy-quality-deprecation-warning quality spec)))
+ (if deprecation-warning
+ (compiler-warn deprecation-warning)
+ (compiler-warn "~@<Ignoring unknown optimization quality ~S in:~_ ~S~:>"
+ quality spec))))
((not (typep raw-value 'policy-quality))
- (compiler-warn "ignoring bad optimization value ~S in ~S"
+ (compiler-warn "~@<Ignoring bad optimization value ~S in:~_ ~S~:>"
raw-value spec))
(t
;; we can't do this yet, because CLOS macros expand
;;; 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.19.11"
+"1.0.19.12"