From 92cc7b2e86eee0a91a56dd2b3fcdc052cfa166db Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Mon, 24 May 2004 14:01:12 +0000 Subject: [PATCH] 0.8.10.51: fiddled with manual to try to address IRC-reported user confusion about whether SBCL being a compiler-only implementation means it's not usable interactively .cvsignore for doc/manual New bug on *PRINT-CIRCLE*, global variables are teh suck. --- BUGS | 37 +++++++++++++++++++++++++++++++++++++ doc/manual/.cvsignore | 5 +++++ doc/manual/intro.texinfo | 26 +++++++++++++++----------- src/code/sharpm.lisp | 3 ++- version.lisp-expr | 2 +- 5 files changed, 60 insertions(+), 13 deletions(-) create mode 100644 doc/manual/.cvsignore diff --git a/BUGS b/BUGS index 4398f22..3dc7a9c 100644 --- a/BUGS +++ b/BUGS @@ -1411,3 +1411,40 @@ WORKAROUND: is closed." -- implying that even though undesirable, early deletion is legal. Restoring the original would none the less be the polite thing to do. + +326: "*PRINT-CIRCLE* crosstalk between streams" + In sbcl-0.8.10.48 it's possible for *PRINT-CIRCLE* references to be + mixed between streams when output operations are intermingled closely + enough (as by doing output on S2 from within (PRINT-OBJECT X S1) in the + test case below), so that e.g. the references #2# appears on a stream + with no preceding #2= on that stream to define it (because the #2= was + sent to another stream). + (cl:in-package :cl-user) + (defstruct foo index) + (defparameter *foo* (make-foo :index 4)) + (defstruct bar) + (defparameter *bar* (make-bar)) + (defparameter *tangle* (list *foo* *bar* *foo*)) + (defmethod print-object ((foo foo) stream) + (let ((index (foo-index foo))) + (format *trace-output* + "~&-$- emitting FOO ~D, ambient *BAR*=~S~%" + index *bar*) + (format stream "[FOO ~D]" index)) + foo) + (let ((tsos (make-string-output-stream)) + (ssos (make-string-output-stream))) + (let ((*print-circle* t) + (*trace-output* tsos) + (*standard-output* ssos)) + (prin1 *tangle* *standard-output*)) + (let ((string (get-output-stream-string ssos))) + (unless (string= string "(#1=[FOO 4] #S(BAR) #1#)") + ;; In sbcl-0.8.10.48 STRING was "(#1=[FOO 4] #2# #1#)".:-( + (error "oops: ~S" string)))) + It might be straightforward to fix this by turning the + *CIRCULARITY-HASH-TABLE* and *CIRCULARITY-COUNTER* variables into + per-stream slots, but (1) it would probably be sort of messy faking + up the special variable binding semantics using UNWIND-PROTECT and + (2) it might be sort of a pain to test that no other bugs had been + introduced. diff --git a/doc/manual/.cvsignore b/doc/manual/.cvsignore new file mode 100644 index 0000000..e2bb6ec --- /dev/null +++ b/doc/manual/.cvsignore @@ -0,0 +1,5 @@ +contrib-doc-list.texi-temp +docstrings +*-stamp +sbcl + diff --git a/doc/manual/intro.texinfo b/doc/manual/intro.texinfo index f4ab036..6ad18eb 100644 --- a/doc/manual/intro.texinfo +++ b/doc/manual/intro.texinfo @@ -131,7 +131,7 @@ likely to be fixed, tuned, or added. SBCL is descended from CMUCL, which is itself descended from Spice Lisp, including early implementations for the Mach operating system on -the IBM RT, back in the 1980s. Design decisions from that time are +the IBM RT, back in the 1980s. Some design decisions from that time are still reflected in the current implementation: @itemize @@ -162,16 +162,20 @@ good) for performance. These are discussed in another chapter, @ref{Efficiency}. SBCL has diverged from CMUCL in that SBCL is now essentially a -``compiler-only implementation'' of Common Lisp. A Common Lisp -implementation is permitted to implement both a compiler and an -interpreter, and there's some special support in the standard -(e.g. the distinction between @code{functionp} and -@code{compiled-function-p}) to help support that. But SBCL has only a -vestigial, rudimentary true interpreter. In SBCL, the @code{eval} -function only truly ``interprets'' a few special classes of forms, -such as symbols which are @code{boundp}. More complicated forms are -evaluated by calling @code{compile} and then calling @code{funcall} on -the returned result. +``compiler-only implementation'' of Common Lisp. This is a change in +implementation strategy, taking advantage of the freedom ``any of these +facilities might share the same execution strategy'' guaranteed in the +ANSI specification section 3.1 (``Evaluation''). It does not mean SBCL +can't be used interactively, and in fact the change is largely invisible +to the casual user, since SBCL still can and does execute code +interactively by compiling it on the fly. (It is visible if you know how +to look, like using @code{compiled-function-p}; and it is visible in the +way that that SBCL doesn't have many bugs which behave differently in +interpreted code than in compiled code.) What it means is that in SBCL, +the @code{eval} function only truly ``interprets'' a few easy kinds of +forms, such as symbols which are @code{boundp}. More complicated forms +are evaluated by calling @code{compile} and then calling @code{funcall} +on the returned result. The direct ancestor of SBCL is the x86 port of CMUCL. This port was in some ways the most cobbled-together of all the CMUCL ports, since a diff --git a/src/code/sharpm.lisp b/src/code/sharpm.lisp index 6bae634..3f898b0 100644 --- a/src/code/sharpm.lisp +++ b/src/code/sharpm.lisp @@ -217,7 +217,8 @@ ;; substitutes in arrays and structures as well as lists. The first arg is an ;; alist of the things to be replaced assoc'd with the things to replace them. (defun circle-subst (old-new-alist tree) - (cond ((not (typep tree '(or cons (array t) structure-object standard-object))) + (cond ((not (typep tree + '(or cons (array t) structure-object standard-object))) (let ((entry (find tree old-new-alist :key #'second))) (if entry (third entry) tree))) ((null (gethash tree *sharp-equal-circle-table*)) diff --git a/version.lisp-expr b/version.lisp-expr index 3cf2df8..2e90834 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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.10.50" +"0.8.10.51" -- 1.7.10.4