1.0.18.11: Add SB-EXT:*MUFFLED-WARNINGS*, to muffle warnings at runtime.
authorRichard M Kreuter <kreuter@users.sourceforge.net>
Thu, 3 Jul 2008 21:31:57 +0000 (21:31 +0000)
committerRichard M Kreuter <kreuter@users.sourceforge.net>
Thu, 3 Jul 2008 21:31:57 +0000 (21:31 +0000)
package-data-list.lisp-expr
src/code/condition.lisp
src/code/target-error.lisp
src/code/target-thread.lisp
version.lisp-expr

index 9174aca..3751308 100644 (file)
@@ -645,6 +645,9 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
                ;; and a mechanism for controlling same at compile time
                "MUFFLE-CONDITIONS" "UNMUFFLE-CONDITIONS"
 
+               ;; and one for controlling same at runtime
+               "*MUFFLED-WARNINGS*"
+
                ;; extended declarations..
                "FREEZE-TYPE" "INHIBIT-WARNINGS"
                "MAYBE-INLINE"
index 594b3ac..a512b02 100644 (file)
@@ -1273,7 +1273,11 @@ the values returned by the form as a list. No associated restarts."))
      (format stream "Returning from STEP")))
   #!+sb-doc
   (:documentation "Condition signaled when STEP returns."))
-
+\f
+;;; A knob for muffling warnings, mostly for use while loading files.
+(defvar *muffled-warnings* nil
+  "A type that ought to specify a subtype of WARNING.  Whenever a warning
+is signaled, if the warning if of this type, it will be muffled.")
 \f
 ;;;; restart definitions
 
index 2f6d3fc..d5025a5 100644 (file)
 ;;; associated with Condition
 (defvar *condition-restarts* ())
 
-(defvar *handler-clusters* nil)
+(defun initial-handler-clusters ()
+  `(((warning . ,#'(lambda (warning)
+                     (when (typep warning
+                                  (locally
+                                      (declare (special sb!ext:*muffled-warnings*))
+                                    sb!ext:*muffled-warnings*))
+                       (muffle-warning warning)))))))
+
+(defvar *handler-clusters* (initial-handler-clusters))
 
 (defstruct (restart (:copier nil) (:predicate nil))
   (name (missing-arg) :type symbol :read-only t)
index 61ea1af..c37afef 100644 (file)
@@ -702,7 +702,7 @@ around and can be retrieved by JOIN-THREAD."
             ;;   --njf, 2006-07-15
             (let* ((*current-thread* thread)
                    (*restart-clusters* nil)
-                   (*handler-clusters* nil)
+                   (*handler-clusters* (sb!kernel::initial-handler-clusters))
                    (*condition-restarts* nil)
                    (sb!impl::*deadline* nil)
                    (sb!impl::*step-out* nil)
index c4c1bc4..4fb7061 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.18.10"
+"1.0.18.11"