0.8.11.19:
authorWilliam Harold Newman <william.newman@airmail.net>
Sat, 19 Jun 2004 21:42:49 +0000 (21:42 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Sat, 19 Jun 2004 21:42:49 +0000 (21:42 +0000)
DEFSTRUCT shouldn't issue warnings for FBOUNDP conflicts at
macroexpansion time. (at compile time or load time,
OK, but not macroexpansion time)
Make DESCRIBE on a gf report its method combination.
manual fix from Brian Mastenbrook sbcl-devel 16 Jun 2004

doc/manual/debugger.texinfo
src/code/defstruct.lisp
src/pcl/describe.lisp
tests/defstruct.impure.lisp
version.lisp-expr

index 82a8f27..493471c 100644 (file)
@@ -55,7 +55,7 @@ or
 
 @item
 the debugger is explicitly entered with the Lisp @code{break} or
-@code{debug} functions.
+@code{invoke-debugger} functions.
 
 @end itemize
 
@@ -78,6 +78,20 @@ execution after this error.  In this case, both options return to
 top-level.  After printing its banner, the debugger prints the current
 frame and the debugger prompt.
 
+When the debugger is invoked by a condition, ANSI mandates that the
+value of @code{*debugger-hook*}, if any, be called with two arguments:
+the condition that caused the debugger to be invoked and the previous
+value of @code{*debugger-hook*}. When this happens,
+@code{*debugger-hook*} is bound to NIL to prevent recursive
+errors. However, ANSI also mandates that @code{*debugger-hook*} not be
+invoked when the debugger is to be entered by the @code{break}
+function. For users who wish to provide an alternate debugger
+interface (and thus catch @code{break} entries into the debugger),
+SBCL provides @code{sb-ext:*invoke-debugger-hook*}, which is invoked
+during any entry into the debugger.
+
+@include var-sb-ext-star-invoke-debugger-hook-star.texinfo
+
 
 @node  The Debugger Command Loop
 @comment  node-name,  next,  previous,  up
@@ -125,7 +139,7 @@ current frame.  For more information on debugger variable access, see
 In the debugger, it is possible to override the printing behaviour of
 the REPL.
 
-@defvr {Variable} *debug-print-variable-alist*
+@defvr {Variable} sb-debug:*debug-print-variable-alist*
 
 An association list describing new bindings for special variables
 (typically *PRINT-FOO* variables) to be used within the debugger, e.g.
index 0660f8e..6d70ebe 100644 (file)
           remove the ambiguity in your code.~@:>"
         accessor-name)
        (setf (dd-predicate-name defstruct) nil))
-      #-sb-xc-host
-      (when (and (fboundp accessor-name)
-                (not (accessor-inherited-data accessor-name defstruct)))
-       (style-warn "redefining ~S in DEFSTRUCT" accessor-name)))
-
+      ;; FIXME: It would be good to check for name collisions here, but
+      ;; the easy check,
+      ;;x#-sb-xc-host
+      ;;x(when (and (fboundp accessor-name)
+      ;;x           (not (accessor-inherited-data accessor-name defstruct)))
+      ;;x  (style-warn "redefining ~S in DEFSTRUCT" accessor-name)))
+      ;; which was done until sbcl-0.8.11.18 or so, is wrong: it causes
+      ;; a warning at MACROEXPAND time, when instead the warning should
+      ;; occur not just because the code was constructed, but because it
+      ;; is actually compiled or loaded.
+      )
+    
     (when default-p
       (setf (dsd-default slot) default))
     (when type-p
       (if read-only
          (setf (dsd-read-only slot) t)
          (when (dsd-read-only slot)
-           (error "Slot ~S is :READ-ONLY in parent and must be :READ-ONLY in subtype ~S."
-                  name
+           (error "~@<The slot ~S is :READ-ONLY in superclass, and so must ~
+                       be :READ-ONLY in subclass.~:@>"
                   (dsd-name slot)))))
     slot))
 
index d459b53..4fd565a 100644 (file)
 (defmethod describe-object ((fun standard-generic-function) stream)
   (format stream "~&~A is a generic function." fun)
   (when (documentation fun t)
-    (format stream "~&  Function documentation: ~A" (documentation fun t)))
+    (format stream "~&Its documentation is: ~A" (documentation fun t)))
   (format stream "~&Its lambda-list is:~&  ~S"
          (generic-function-pretty-arglist fun))
+  (format stream "~&Its method-combination is:~&  ~S"
+         (generic-function-method-combination fun))
   (let ((methods (generic-function-methods fun)))
     (if (null methods)
        (format stream "~&It has no methods.~%")
index 8f2f5b2..a23302f 100644 (file)
 (assert (not (bug-332b-aux-p #(1 2 3 4 5 x 1 2 bug-332a-aux))))
 (assert (bug-332b-aux-p #(1 2 3 4 5 x 1 2 bug-332b-aux)))
 
+;;; In sbcl-0.8.11.8 FBOUNDPness potential collisions of structure
+;;; slot accessors signalled a condition at macroexpansion time, not
+;;; when the code was actually compiled or loaded.
+(let ((defstruct-form '(defstruct bug-in-0-8-11-8 x)))
+  (defun bug-in-0-8-11-8-x (z) (print "some unrelated thing"))
+  (handler-case (macroexpand defstruct-form)
+    (warning (c)
+      (error "shouldn't warn just from macroexpansion here"))))
+
 ;;; success
 (format t "~&/returning success~%")
 (quit :unix-status 104)
index 5a77931..decfd2a 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".)
-"0.8.11.18"
+"0.8.11.19"