mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
Name dumped MAKE-LOAD-FORM results opaquely
The name had no use except seemingly to disambiguate a call stack when debugging the compiler per se. Any random name suffices, even if unstable. (If you "need" that name, you've got bigger problems)
This commit is contained in:
parent
c085b7b08d
commit
38be0a3022
|
|
@ -1568,7 +1568,13 @@ necessary, since type inference may take arbitrarily long to converge.")
|
||||||
(fasl-note-dumpable-instance constant fasl)
|
(fasl-note-dumpable-instance constant fasl)
|
||||||
t)
|
t)
|
||||||
(t
|
(t
|
||||||
(let* ((name (write-to-string constant :level 1 :length 2))
|
;; Allow dumping objects that can't be printed
|
||||||
|
;; Non-invocation of PRINT-OBJECT is tested by 'mlf.impure-cload.lisp'.
|
||||||
|
(let* ((name #+sb-xc-host 'blobby ; the name means nothing
|
||||||
|
#-sb-xc-host
|
||||||
|
(format nil "the-~A-formerly-known-as-~X"
|
||||||
|
(type-of constant)
|
||||||
|
(get-lisp-obj-address constant)))
|
||||||
(info (if init-form
|
(info (if init-form
|
||||||
(list constant name init-form)
|
(list constant name init-form)
|
||||||
(list constant))))
|
(list constant))))
|
||||||
|
|
|
||||||
20
tests/mlf.impure-cload.lisp
Normal file
20
tests/mlf.impure-cload.lisp
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
||||||
|
(defstruct fool x))
|
||||||
|
(eval-when (:compile-toplevel)
|
||||||
|
(defmethod make-load-form ((self fool) &optional env)
|
||||||
|
(declare (ignore env))
|
||||||
|
`(make-fool :x ,(fool-x self)))
|
||||||
|
(defparameter *crashy* t)
|
||||||
|
(defmethod print-object ((self fool) stream)
|
||||||
|
(if *crashy*
|
||||||
|
(progn
|
||||||
|
(setq *crashy* nil)
|
||||||
|
(error "Sorry!"))
|
||||||
|
(call-next-method))))
|
||||||
|
|
||||||
|
;;; We used to try to "name" everything dumped.
|
||||||
|
;;; If nothing else, the name should have been written with :READABLY NIL
|
||||||
|
;;; just in case it was going to signal print-not-readable.
|
||||||
|
;;; Now we don't print-object at all.
|
||||||
|
(defvar *foolz*
|
||||||
|
'#.(list (make-fool :x 1) (make-fool :x 2)))
|
||||||
Loading…
Reference in a new issue