From: William Harold Newman Date: Sun, 24 Jun 2001 13:13:42 +0000 (+0000) Subject: 0.6.12.40: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=ed1c91123b631640939db72970469ccfc65cecf0;p=sbcl.git 0.6.12.40: fixed bug 107: (WRITE #*101 :RADIX T :BASE 36) now does the right thing. --- diff --git a/BUGS b/BUGS index 1f4e07b..88ebb47 100644 --- a/BUGS +++ b/BUGS @@ -973,14 +973,6 @@ Error in function C::GET-LAMBDA-TO-COMPILE: This is funny since sbcl-0.6.12.34 knows (SUBTYPEP '(EQL 0) 'NUMBER) => T -107: - (reported as a CMU CL bug by Erik Naggum on comp.lang.lisp - 2001-06-11:) - * (write #*101 :radix t :base 36) - #*#36r1#36r0#36r1 - #*101 - * - 108: (TIME (ROOM T)) reports more than 200 Mbytes consed even for a clean, just-started SBCL system. And it seems to be right: diff --git a/NEWS b/NEWS index 73b2f92..34f09c7 100644 --- a/NEWS +++ b/NEWS @@ -739,16 +739,16 @@ changes in sbcl-0.6.13 relative to sbcl-0.6.12: * a port to the Compaq/DEC Alpha CPU, thanks to Dan Barlow * Martin Atzmueller ported Tim Moore's marvellous CMU CL DISASSEMBLE patch, so that DISASSEMBLE output is much nicer. -* better error handling in CLOS method combination, thanks to - Martin Atzmueller porting Pierre Mai's CMU CL patches * Pathnames are much more ANSI-compliant, thanks to various fixes and tests from Dan Barlow. * Hash tables can be printed readably, as inspired by CMU CL code of Eric Marsden and SBCL code of Martin Atzmueller. * Compiler trace output (the :TRACE-FILE option to COMPILE-FILE) - is now a supported extension again, since the consensus is that - it can be useful for ordinary development work, not just for - debugging SBCL itself. + is now a supported extension again, since the consensus on + sbcl-devel was that it can be useful for ordinary development + work, not just for debugging SBCL itself. +* better error handling in CLOS method combination, thanks to + Martin Atzmueller porting Pierre Mai's CMU CL patches * At Dan Barlow's suggestion, TRUENAME on a dangling symbolic link now returns the dangling link itself, and for similar reasons, TRUENAME on a cyclic symbolic link returns the cyclic link itself. @@ -756,7 +756,13 @@ changes in sbcl-0.6.13 relative to sbcl-0.6.12: endlessly, respectively.) As a consequence of this change, DIRECTORY now works even in the presence of dangling and cyclic symbolic links. -* more overflow fixes for >16Mbyte i/o buffers +* more overflow fixes for >16Mbyte I/O buffers +* fixed bug 107 (reported as a CMU CL bug by Erik Naggum on + comp.lang.lisp 2001-06-11): (WRITE #*101 :RADIX T :BASE 36) now + does the right thing. +* The implementation of some type tests, especially for CONDITION + types, is now tidier and maybe faster, due to CMU CL code + originally by Douglas Crosher, ported by Martin Atzmueller. * There's a new slam.sh hack to shorten the edit/compile/debug cycle for low-level changes to SBCL itself, and a new :SB-AFTER-XC-CORE target feature to control the generation of @@ -770,7 +776,7 @@ changes in sbcl-0.6.13 relative to sbcl-0.6.12: COMPILE-FILE is no longer supported, so that now every function gets an entry point, so that block compilation looks a little more like the plain vanilla ANSI section 3.2.2.3 scheme. -?? minor incompatible change: SB-EXT:GET-BYTES-CONSED now +* minor incompatible change: SB-EXT:GET-BYTES-CONSED now returns the number of bytes consed since the system started, rather than the number consed since the first time the function was called. (The new definition parallels ANSI functions like diff --git a/src/code/print.lisp b/src/code/print.lisp index 7bb66a9..66c865e 100644 --- a/src/code/print.lisp +++ b/src/code/print.lisp @@ -957,8 +957,10 @@ (output-terse-array vector stream)) ((bit-vector-p vector) (write-string "#*" stream) - (dotimes (i (length vector)) - (output-object (aref vector i) stream))) + (dovector (bit vector) + ;; (Don't use OUTPUT-OBJECT here, since this code + ;; has to work for all possible *PRINT-BASE* values.) + (write-char (if (zerop bit) #\0 #\1) stream))) (t (when (and *print-readably* (not (eq (array-element-type vector) t))) @@ -973,7 +975,7 @@ (write-string ")" stream))))) ;;; This function outputs a string quoting characters sufficiently -;;; that so someone can read it in again. Basically, put a slash in +;;; so that someone can read it in again. Basically, put a slash in ;;; front of an character satisfying NEEDS-SLASH-P. (defun quote-string (string stream) (macrolet ((needs-slash-p (char) @@ -988,21 +990,20 @@ (when (needs-slash-p char) (write-char #\\ stream)) (write-char char stream)))))) +;;; Output the printed representation of any array in either the #< or #A +;;; form. (defun output-array (array stream) - #!+sb-doc - "Outputs the printed representation of any array in either the #< or #A - form." (if (or *print-array* *print-readably*) (output-array-guts array stream) (output-terse-array array stream))) -;;; to output the abbreviated #< form of an array +;;; Output the abbreviated #< form of an array. (defun output-terse-array (array stream) (let ((*print-level* nil) (*print-length* nil)) (print-unreadable-object (array stream :type t :identity t)))) -;;; to output the readable #A form of an array +;;; Output the readable #A form of an array. (defun output-array-guts (array stream) (when (and *print-readably* (not (eq (array-element-type array) t))) diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index 1e4c5dc..d2e276c 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -2548,7 +2548,7 @@ ;; writing codes/strings for internal errors (format t "#define ERRORS { \\~%") - ;; FIXME: Is this just DO-VECTOR? + ;; FIXME: Is this just DOVECTOR? (let ((internal-errors sb!c:*backend-internal-errors*)) (dotimes (i (length internal-errors)) (format t " ~S, /*~D*/ \\~%" (cdr (aref internal-errors i)) i))) diff --git a/tests/print.impure.lisp b/tests/print.impure.lisp index 9935402..02958ff 100644 --- a/tests/print.impure.lisp +++ b/tests/print.impure.lisp @@ -32,5 +32,12 @@ ;;; an error) and provided a fix which was ported to sbcl-0.6.12.35. (assert (null (format t "~F" "foo"))) +;;; This was a bug in SBCL until 0.6.12.40 (originally reported as a +;;; CMU CL bug by Erik Naggum on comp.lang.lisp). +(loop for *print-base* from 2 to 36 + with *print-radix* = t + do + (assert (string= "#*101" (format nil "~S" #*101)))) + ;;; success (quit :unix-status 104)