0.7.7.16:
authorChristophe Rhodes <csr21@cam.ac.uk>
Thu, 5 Sep 2002 13:15:48 +0000 (13:15 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Thu, 5 Sep 2002 13:15:48 +0000 (13:15 +0000)
Fix bug 113
... allow logical hosts to be dumped, as references to the name
of the host
... test for dumping behaviour
Fix bug 174
... when the bad directive character has a name, print it as
part of the error message
Save a massive 20k or so on core size by zapping globaldb
entries for cold-init symbols
Various text file frobs and comments

12 files changed:
BUGS
INSTALL
NEWS
TLA
src/code/cold-init.lisp
src/code/late-format.lisp
src/code/pathname.lisp
src/code/target-format.lisp
src/compiler/x86/alloc.lisp
src/compiler/x86/backend-parms.lisp
tests/dump.impure-cload.lisp
version.lisp-expr

diff --git a/BUGS b/BUGS
index 211bc1d..2e0077e 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -582,25 +582,6 @@ WORKAROUND:
   type declarations are supposed to be treated as assertions unless
   SAFETY 0, so we should be getting a TYPE-ERROR.
 
-113:
-  reported by Martin Atzmueller 2001-06-25; originally from CMU CL bugs
-  collection:
-    (in-package :cl-user)
-    ;;; From: David Gadbois <gadbois@cyc.com>
-    ;;;
-    ;;; Logical pathnames aren't externalizable.
-    ;;; Test case:
-    (let ((tempfile "/tmp/test.lisp"))
-      (setf (logical-pathname-translations "XXX")
-            '(("XXX:**;*.*" "/tmp/**/*.*")))
-      (with-open-file (out tempfile :direction :output)
-        (write-string "(defvar *path* #P\"XXX:XXX;FOO.LISP\")" out))
-      (compile-file tempfile))
-  The error message in sbcl-0.6.12.42 is
-    ; caught ERROR:
-    ;   (while making load form for #<SB-IMPL::LOGICAL-HOST "XXX">)
-    ; A logical host can't be dumped as a constant: #<SB-IMPL::LOGICAL-HOST "XXX">
-
 115:
   reported by Martin Atzmueller 2001-06-25; originally from CMU CL bugs
   collection:
@@ -1087,19 +1068,6 @@ WORKAROUND:
   code. Since then the warning has been downgraded to STYLE-WARNING, 
   so it's still a bug but at least it's a little less annoying.
 
-174:
-  The error message from attempting to use a #\Return format
-  directive:
-    (format nil "~^M") ; replace "^M" with a literal #\Return
-      debugger invoked on condition of type SB-FORMAT::FORMAT-ERROR:
-      error in format:                  unknown format directive
-      ~
-       ^
-  is not terribly helpful; this is more noticeable than parallel cases
-  with e.g. #\Backspace because of the differing newline conventions
-  on various operating systems. (reported by Harald Hanche-Olsen on
-  cmucl-help 2002-05-31)
-
 176:
   reported by Alexey Dejneka 08 Jun 2002 in sbcl-devel:
     Playing with McCLIM, I've received an error "Unbound variable WRAPPER
diff --git a/INSTALL b/INSTALL
index be59775..fe184fb 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -33,7 +33,7 @@ So: the standard installation procedure is
   2. Copy sbcl to /usr/bin or /usr/local/bin.
   3. Optionally copy sbcl.1 to /usr/man/man1 or /usr/local/man/man1.
 The script install.sh does these for you (choosing the /usr/local
-subdirectory) in each case.
+subdirectory in each case).
 
 
 IF YOU HAVE A SOURCE DISTRIBUTION:
@@ -50,6 +50,11 @@ This software has been built successfully on these systems:
                        host lisp = SBCL itself
                os = OpenBSD 2.6, 2.7, 2.8, 2.9, and 3.0
                        host lisp = SBCL itself
+       cpu = alpha
+               os = Debian GNU/Linux 2.2 with libc >= 2.1
+                       host lisp = SBCL itself
+               os = Tru64 5.1
+                       host lisp = SBCL itself
        cpu = sparc
                os = Debian GNU/Linux 2.2 with libc >= 2.2
                        host lisp = SBCL itself
@@ -60,8 +65,8 @@ This software has been built successfully on these systems:
                        host lisp = OpenMCL 0.12
                        host lisp = SBCL itself
 
-It is known not to build under CLISP because of (as of early June 2002)
-bugs in the CLISP garbage collector.
+It is known not to build under CLISP (as of early June 2002) because
+of bugs in the CLISP garbage collector.
 
 Reports of other systems that it works on (or doesn't work on, for
 that matter), or help in making it run on more systems, would be
diff --git a/NEWS b/NEWS
index 593c4a9..c08fbb8 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1254,6 +1254,11 @@ changes in sbcl-0.7.8 relative to sbcl-0.7.7:
   * fixed bug 120a: The compiler now deals correctly with IFs where
     the consequent is the same as the alternative, instead of
     misderiving the return type. (thanks to Alexey Dejneka)
+  * fixed bug 113: Logical pathnames are now dumpable (the logical
+    host is resolved at load-time, throwing an error if it is not
+    found).
+  * fixed bug 174: FORMAT's error message is slightly clearer when a
+    non-printing character is used in a format directive.
 
 planned incompatible changes in 0.7.x:
 * When the profiling interface settles down, maybe in 0.7.x, maybe
diff --git a/TLA b/TLA
index 77a79c1..6f0b6a7 100644 (file)
--- a/TLA
+++ b/TLA
@@ -24,6 +24,7 @@ making them more consistent.
        N       new: number, as in e.g. N-PASSES or N-WORD-BITS
                old: conventional prefix for temporary variables used to
                        implement evaluate-only-once semantics in macros
+       NLX     non-local exit (in compiler IR2)
        SB      storage base (in compiler IR2)
        SC      storage class (in compiler IR2)
        TN      temporary name (?) (in compiler IR2)
index 2b7f329..e7429a2 100644 (file)
@@ -22,8 +22,8 @@
 ;;; anything whose name matches a magic character pattern is
 ;;; uninterned.
 ;;;
-;;; FIXME: should also go through globaldb (and perhaps other tables)
-;;; blowing away associated entries
+;;; FIXME: Are there other tables that need to have entries removed?
+;;; What about symbols of the form DEF!FOO?
 (defun !unintern-init-only-stuff ()
   (do ((any-changes? nil nil))
       (nil)
                         (string= name "*!" :end1 2 :end2 2)))
            (/show0 "uninterning cold-init-only symbol..")
            (/primitive-print name)
+           ;; FIXME: Is this (FIRST (LAST *INFO-ENVIRONMENT*)) really
+           ;; meant to be an idiom to use?  Is there a more obvious
+           ;; name for this? [e.g. (GLOBAL-ENVIRONMENT)?]
+           (do-info ((first (last *info-environment*))
+                           :name entry :class class :type type)
+             (when (eq entry symbol)
+               (clear-info class type entry)))
            (unintern symbol package)
            (setf any-changes? t)))))
     (unless any-changes?
index a7d63bd..bc1cfe4 100644 (file)
        (if expander
           (funcall expander directive more-directives)
           (error 'format-error
-                 :complaint "unknown directive"))))
+                 :complaint "unknown directive ~@[(character: ~A)~]"
+                 :args (list (char-name (format-directive-character directive)))))))
     (simple-string
      (values `(write-string ,directive stream)
             more-directives))))
index 4df7de6..da7e137 100644 (file)
   (print-unreadable-object (logical-host stream :type t)
     (prin1 (logical-host-name logical-host) stream)))
 
-;;; What would it mean to dump a logical host and reload it into
-;;; another Lisp image? It's not clear, so we don't support it.
 (defun make-logical-host-load-form-fun (logical-host)
-  (error "~@<A logical host can't be dumped as a constant: ~2I~_~S~:>"
-         logical-host))
+  (values `(find-logical-host ',(logical-host-name logical-host))
+         nil))
 
 ;;; A PATTERN is a list of entries and wildcards used for pattern
 ;;; matches of translations.
index bf26753..5616393 100644 (file)
           (interpret-directive-list stream (cdr directives) orig-args args))
          (format-directive
           (multiple-value-bind (new-directives new-args)
-              (let ((function
-                     (svref *format-directive-interpreters*
-                            (char-code (format-directive-character
-                                        directive))))
-                    (*default-format-error-offset*
-                     (1- (format-directive-end directive))))
+              (let* ((character (format-directive-character directive))
+                     (function
+                      (svref *format-directive-interpreters*
+                             (char-code character)))
+                     (*default-format-error-offset*
+                      (1- (format-directive-end directive))))
                 (unless function
                   (error 'format-error
-                         :complaint "unknown format directive"))
+                         :complaint "unknown format directive ~@[(character: ~A)~]"
+                         :args (list (char-name character))))
                 (multiple-value-bind (new-directives new-args)
                     (funcall function stream directive
                              (cdr directives) orig-args args)
   (let* ((name (char-name char)))
     (cond (name
           (write-string (string-capitalize name) stream))
-         ((<= 0 (char-code char) 31)
-          ;; Print control characters as "^"<char>. (This seems to be
-          ;; old pre-ANSI behavior, but ANSI just says that the "#^"
-          ;; sequence is undefined and not reserved for the user, so
-          ;; this behavior should be ANSI-compliant.)
-          (write-char #\^ stream)
-          (write-char (code-char (+ 64 (char-code char))) stream))
          (t
           (write-char char stream)))))
 
index 4286c2e..c01f9a2 100644 (file)
       (inst mov (make-fixup (extern-alien-name "fast_random_state") :foreign)
            temp)
       ;; We want a positive fixnum for the hash value, so discard the LS bits.
+      ;;
+      ;; FIXME: OK, who wants to tell me (CSR) why these two
+      ;; instructions aren't replaced by (INST AND TEMP #x8FFFFFFC)?
+      ;; Are the following two instructions actually faster?  Does the
+      ;; difference in behaviour really matter?
       (inst shr temp 1)
       (inst and temp #xfffffffc)
       (storew temp result symbol-hash-slot other-pointer-lowtag)
index 44e0634..a1802f5 100644 (file)
 ;;; code for it, but mostly we need it for GENESIS, which doesn't in
 ;;; general have our C runtime code running to ask, so instead we set
 ;;; it by hand. -- WHN 2001-04-15
+;;;
+;;; Though note that POSIX specifies (as far as I can tell)
+;;;
+;;;   sysconf(_SC_PAGE_SIZE);
+;;;
+;;; as a portable way of retrieving this information; a call to this
+;;; could be made in grovel-headers (which, strictly speaking, would
+;;; no longer solely be grovelling headers), though the question of
+;;; how to make this information appear in GENESIS, which is built and
+;;; run from host-1 files (which are made before grovel-headers runs)
+;;; would remain.  -- CSR, 2002-09-01
 (setf *backend-page-size* 4096)
 ;;; comment from CMU CL:
 ;;;
index 8cb8b89..614e5c7 100644 (file)
 (assert (equalp (foo-x *foo*) '("X")))
 (assert (eql (foo-y *foo*) *foo*))
 
+;;; Logical pathnames should be dumpable, too, but what does it mean?
+;;; As of sbcl-0.7.7.16, we've taken dumping the host part to mean
+;;; dumping a reference to the name of the host (much as dumping a
+;;; symbol involves dumping a reference to the name of its package).
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (setf (logical-pathname-translations "MY-LOGICAL-HOST")
+       (list '("**;*.*.*" "/tmp/*.*"))))
+
+(defparameter *path* #p"MY-LOGICAL-HOST:FOO;BAR.LISP")
+
 (sb-ext:quit :unix-status 104) ; success
index f23d203..b10b5b7 100644 (file)
@@ -18,4 +18,4 @@
 ;;; for internal versions, especially for internal versions off the
 ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.7.15"
+"0.7.7.16"