* Allows using SB-COVER with (RESTRICT-COMPILER-POLICY 'SAFETY 3).
(when (and fun
;; If somebody is really sure that they want to modify
;; constants, let them.
- (policy node (> safety 0)))
+ (policy node (> check-constant-modification 0)))
(let ((destroyed-constant-args (funcall fun args)))
(when destroyed-constant-args
(let ((*compiler-error-context* node))
`(locally
(declare (optimize speed
(safety 0)
- (debug 0)))
+ (debug 0)
+ (check-constant-modification 0)))
;; We're being naughty here, and
;; modifying constant data. That's ok,
;; we know what we're doing.
(in-package "SB!C")
+(define-optimization-quality check-constant-modification
+ safety
+ ("no" "maybe" "yes" "yes")
+ "Control whether the compiler should check for constant
+modification. Defaults to SAFETY.")
+
(define-optimization-quality type-check
;; FIXME: grepping the tree for "policy.*safety" yields some
;; places which might want to use this instead -- or
;;; 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.14.15"
+"1.0.14.16"