0.6.8.19:
authorWilliam Harold Newman <william.newman@airmail.net>
Wed, 15 Nov 2000 15:14:48 +0000 (15:14 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Wed, 15 Nov 2000 15:14:48 +0000 (15:14 +0000)
tweaked debug frame printing to discourage too-long lines
"Arg" is a great abbrev, but not great enough for error msgs.
fixed *DEBUGGER-HOOK* thinko

src/code/debug.lisp
src/code/defboot.lisp
src/code/early-extensions.lisp
src/code/early-setf.lisp
src/code/fd-stream.lisp
src/code/late-target-error.lisp
src/code/target-eval.lisp
src/code/target-numbers.lisp
src/code/target-pathname.lisp
version.lisp-expr

index 16f9176..d147049 100644 (file)
@@ -486,7 +486,7 @@ Function and macro commands:
                                             s)))))
   string)
 
-;;; Print frame with verbosity level 1. If we hit a &REST arg, then
+;;; Print FRAME with verbosity level 1. If we hit a &REST arg, then
 ;;; print as many of the values as possible, punting the loop over
 ;;; lambda-list variables since any other arguments will be in the
 ;;; &REST arg's list of values.
@@ -510,25 +510,15 @@ Function and macro commands:
                                               (second ele) frame))
                                     results))
                       (return))
-                    (push (make-unprintable-object "unavailable &REST arg")
+                    (push (make-unprintable-object
+                           "unavailable &REST argument")
                           results)))))
       (sb!di:lambda-list-unavailable
        ()
        (push (make-unprintable-object "lambda list unavailable") results)))
-    ;; FIXME: For some reason this sometimes prints as
-    ;;    (FOO-BAR-LONG-THING
-    ;;     X
-    ;;     Y
-    ;;     Z)
-    ;; (OK) and sometimes prints as
-    ;;    (FOO-BAR-LONG-THING X
-    ;;                        Y
-    ;;                        Z)
-    ;; even when this second style causes confusingly long weird lines
-    ;; (bad). Handle printing explicitly inside our own
-    ;; PPRINT-LOGICAL-BLOCK, and force the preferred style for long
-    ;; lines.
-    (prin1 (mapcar #'ensure-printable-object (nreverse results)))
+    (pprint-logical-block (*standard-output* nil)
+      (let ((x (nreverse (mapcar #'ensure-printable-object results))))
+       (format t "(~@<~S~{ ~_~S~}~:>)" (first x) (rest x))))
     (when (sb!di:debug-function-kind d-fun)
       (write-char #\[)
       (prin1 (sb!di:debug-function-kind d-fun))
@@ -545,9 +535,9 @@ Function and macro commands:
 
 (defun frame-call-arg (var location frame)
   (lambda-var-dispatch var location
-    (make-unprintable-object "unused arg")
+    (make-unprintable-object "unused argument")
     (sb!di:debug-var-value var frame)
-    (make-unprintable-object "unavailable arg")))
+    (make-unprintable-object "unavailable argument")))
 
 ;;; Prints a representation of the function call causing FRAME to
 ;;; exist. VERBOSITY indicates the level of information to output;
@@ -606,7 +596,7 @@ Function and macro commands:
   (let ((old-hook *debugger-hook*))
     (when old-hook
       (let ((*debugger-hook* nil))
-       (funcall hook condition hook))))
+       (funcall old-hook condition old-hook))))
   (sb!unix:unix-sigsetmask 0)
 
   ;; Elsewhere in the system, we use the SANE-PACKAGE function for
@@ -936,7 +926,7 @@ reset to ~S."
        :rest ((let ((var (second ele)))
                 (lambda-var-dispatch var (sb!di:frame-code-location
                                           *current-frame*)
-                  (error "unused &REST arg before n'th argument")
+                  (error "unused &REST argument before n'th argument")
                   (dolist (value
                            (sb!di:debug-var-value var *current-frame*)
                            (error
@@ -945,7 +935,7 @@ reset to ~S."
                     (if (zerop n)
                         (return-from nth-arg (values value nil))
                         (decf n)))
-                  (error "invalid &REST arg before n'th argument")))))
+                  (error "invalid &REST argument before n'th argument")))))
       (decf n))))
 
 (defun arg (n)
index f095935..00ca92d 100644 (file)
 ;;; other things defined in terms of COND
 (defmacro-mundanely when (test &body forms)
   #!+sb-doc
-  "First arg is a predicate. If it is non-null, the rest of the forms are
+  "If the first argument is true, the rest of the forms are
   evaluated as a PROGN."
   `(cond (,test nil ,@forms)))
 (defmacro-mundanely unless (test &body forms)
   #!+sb-doc
-  "First arg is a predicate. If it is null, the rest of the forms are
+  "If the first argument is not true, the rest of the forms are
   evaluated as a PROGN."
   `(cond ((not ,test) nil ,@forms)))
 (defmacro-mundanely and (&rest forms)
index 68f5e25..25ae528 100644 (file)
       (let ((n 0))
         (dolist (arg args)
           (unless (= (length arg) 2)
-            (error "bad arg spec: ~S" arg))
+            (error "bad argument spec: ~S" arg))
           (let ((arg-name (first arg))
                 (test (second arg)))
             (arg-vars arg-name)
index 2219eb3..d9d8081 100644 (file)
@@ -283,10 +283,10 @@ GET-SETF-EXPANSION directly."
            ((eq arg '&rest)
             (if (symbolp (cadr ll))
               (setq rest-arg (cadr ll))
-              (error "Non-symbol &REST arg in definition of ~S." name))
+              (error "Non-symbol &REST argument in definition of ~S." name))
             (if (null (cddr ll))
               (return nil)
-              (error "Illegal stuff after &REST arg.")))
+              (error "Illegal stuff after &REST argument.")))
            ((memq arg '(&key &allow-other-keys &aux))
             (error "~S not allowed in DEFINE-MODIFY-MACRO lambda list." arg))
            ((symbolp arg)
index 22c3190..41d8d97 100644 (file)
 
 (in-package "SB!IMPL")
 
+;;; FIXME: Wouldn't it be clearer to just have the structure
+;;; definition be DEFSTRUCT FILE-STREAM (instead of DEFSTRUCT
+;;; FD-STREAM)? That way we'd have TYPE-OF and PRINT-OBJECT refer to
+;;; these objects as FILE-STREAMs (the ANSI name) instead of the
+;;; internal implementation name FD-STREAM, and there might be other
+;;; benefits as well.
 (deftype file-stream () 'fd-stream)
 \f
 ;;;; buffer manipulation routines
 
+;;; FIXME: Is it really good to maintain this pool separate from the GC?
 (defvar *available-buffers* ()
   #!+sb-doc
   "List of available buffers. Each buffer is an sap pointing to
index a636049..f941ab0 100644 (file)
                   (error 'simple-type-error
                          :datum thing
                          :expected-type 'condition-class
-                         :format-control "bad thing for class arg:~%  ~S"
+                         :format-control "bad thing for class argument:~%  ~S"
                          :format-arguments (list thing)))))
         (res (make-condition-object args)))
     (setf (%instance-layout res) (class-layout class))
index 8345ec7..17e2663 100644 (file)
 ;;; EVAL-WHEN.
 (defun eval (original-exp)
   #!+sb-doc
-  "Evaluates its single arg in a null lexical environment, returns the
+  "Evaluates its single argument in a null lexical environment, returns the
   result or results."
   (declare (optimize (safety 1)))
   (let ((exp (macroexpand original-exp)))
index c518c6a..c10c22e 100644 (file)
 
 (defun / (number &rest more-numbers)
   #!+sb-doc
-  "Divides the first arg by each of the following arguments, in turn.
-  With one arg, returns reciprocal."
+  "Divide the first argument by each of the following arguments, in turn.
+  With one argument, return reciprocal."
   (if more-numbers
       (do ((nlist more-numbers (cdr nlist))
           (result number))
index 1e12f0a..2980700 100644 (file)
@@ -600,7 +600,7 @@ a host-structure or string."
                             (extract-logical-host-prefix namestr start end)
                             (pathname-host defaults))))
        (unless parse-host
-         (error "When Host arg is not supplied, Defaults arg must ~
+         (error "When HOST argument is not supplied, DEFAULTS arg must ~
                  have a non-null PATHNAME-HOST."))
 
        (multiple-value-bind (new-host device directory file type version)
index 8ac4a04..1a17050 100644 (file)
@@ -15,4 +15,4 @@
 ;;; versions, and a string like "0.6.5.12" is used for versions which
 ;;; aren't released but correspond only to CVS tags or snapshots.
 
-"0.6.8.18"
+"0.6.8.19"