in local calls.
** fixed non-pretty printing of arrays with *PRINT-RADIX* being
true.
+ ** provided a readably-printable representation for RANDOM-STATE
+ objects.
+ ** ensured that pathnames, where they have a namestring, always
+ print using #P"..." syntax.
planned incompatible changes in 0.8.x:
* (not done yet, but planned:) When the profiling interface settles
(def!method make-load-form ((pathname pathname) &optional environment)
(make-load-form-saving-slots pathname :environment environment))
-
-;;; The potential conflict with search lists requires isolating the
-;;; printed representation to use the i/o macro #.(logical-pathname
-;;; <path-designator>).
-;;;
-;;; FIXME: We don't use search lists any more, so that comment is
-;;; stale, right?
-(def!method print-object ((pathname logical-pathname) stream)
- (let ((namestring (handler-case (namestring pathname)
- (error nil))))
- (if (and namestring (or *read-eval* (not *print-readably*)))
- (format stream "#.(CL:LOGICAL-PATHNAME ~S)" namestring)
- (print-unreadable-object (pathname stream :type t)
- (format
- stream
- "~_:HOST ~S ~_:DIRECTORY ~S ~_:NAME ~S ~_:TYPE ~S ~_:VERSION ~S"
- (%pathname-host pathname)
- (%pathname-directory pathname)
- (%pathname-name pathname)
- (%pathname-type pathname)
- (%pathname-version pathname))))))
\f
;;; A pathname is logical if the host component is a logical host.
;;; This constructor is used to make an instance of the correct type
(def!method make-load-form ((random-state random-state) &optional environment)
(make-load-form-saving-slots random-state :environment environment))
+(def!method print-object ((state random-state) stream)
+ (if (and *print-readably* (not *read-eval*))
+ (error 'print-not-readable :object state)
+ (format stream "#S(~S ~S #.~S)"
+ 'random-state
+ ':state
+ `(make-array 627
+ :element-type
+ '(unsigned-byte 32)
+ :initial-contents
+ ',(coerce (random-state-state state) 'list)))))
+
;;; The state is stored in a (simple-array (unsigned-byte 32) (627))
;;; wrapped in a random-state structure:
;;;
;;; 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.54"
+"0.8.10.55"