X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fprint-object.lisp;h=964c84be6ef390c24534844234aba411c945a5d4;hb=683874b497a99cd2c11b6c5d9b47e2785b1ede5f;hp=941bd5e3a1a2b928961266f942521994e44989b7;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/pcl/print-object.lisp b/src/pcl/print-object.lisp index 941bd5e..964c84b 100644 --- a/src/pcl/print-object.lisp +++ b/src/pcl/print-object.lisp @@ -25,27 +25,29 @@ ;;;; warranty about the software, its performance or its conformity to any ;;;; specification. -(sb-int:file-comment - "$Header$") - (in-package "SB-PCL") ;;;; the PRINT-OBJECT generic function -;;; Blow away the old non-generic function placeholder which was used by the -;;; printer doing bootstrapping, and immediately replace it with some new -;;; printing logic, so that the Lisp printer stays crippled only for the -;;; shortest necessary time. +;;; Blow away the old non-generic function placeholder which was used +;;; by the printer doing bootstrapping, and immediately replace it +;;; with some new printing logic, so that the Lisp printer stays +;;; crippled only for the shortest necessary time. +(/show0 "about to replace placeholder PRINT-OBJECT with DEFGENERIC") (let (;; (If we don't suppress /SHOW printing while the printer is ;; crippled here, it becomes really easy to crash the bootstrap ;; sequence by adding /SHOW statements e.g. to the compiler, ;; which kinda defeats the purpose of /SHOW being a harmless ;; tracing-style statement.) - #+sb-show (sb-int:*/show* nil)) + #+sb-show (*/show* nil) + ;; (another workaround for the problem of debugging while the + ;; printer is disabled here) + (sb-impl::*print-object-is-disabled-p* t)) (fmakunbound 'print-object) (defgeneric print-object (object stream)) (defmethod print-object ((x t) stream) (print-unreadable-object (x stream :type t :identity t)))) +(/show0 "done replacing placeholder PRINT-OBJECT with DEFGENERIC") ;;;; a hook called by the printer to take care of dispatching to PRINT-OBJECT ;;;; for appropriate FUNCALLABLE-INSTANCE objects @@ -130,7 +132,7 @@ (defmethod print-object ((cache cache) stream) (print-unreadable-object (cache stream :type t :identity t) (format stream - "~D ~S ~D" + "~W ~S ~W" (cache-nkeys cache) (cache-valuep cache) (cache-nlines cache))))