1.0.14.16: add explicit CHECK-CONSTANT-MODIFICATION policy
authorNikodemus Siivola <nikodemus@random-state.net>
Mon, 4 Feb 2008 15:40:32 +0000 (15:40 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Mon, 4 Feb 2008 15:40:32 +0000 (15:40 +0000)
 * Allows using SB-COVER with (RESTRICT-COMPILER-POLICY 'SAFETY 3).

src/compiler/ir1opt.lisp
src/compiler/ir1tran.lisp
src/compiler/policies.lisp
version.lisp-expr

index 3a495b4..e0c4a72 100644 (file)
          (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))
index 18619b0..903a0a6 100644 (file)
                              `(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.
index 1ee4f10..9164e6b 100644 (file)
 
 (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
index 9154970..cc445fd 100644 (file)
@@ -17,4 +17,4 @@
 ;;; 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"