Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/lisp/kernel/cmp/cmpltv.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
;;; The object may be fully initialized or may require further initialization.
(defclass creator (instruction)
((%index :initform nil :initarg :index :accessor index
:type (integer 0))))
:type (or null (integer 0)))))
;;; A creator for which a prototype value (which the eventual LTV will be
;;; similar to) is available.
(defclass vcreator (creator)
Expand All @@ -55,15 +55,19 @@

(defmethod print-object ((object creator) stream)
(print-unreadable-object (object stream :type t)
(format stream "~d" (index object)))
(if (slot-boundp object '%index)
(format stream "~d" (index object))
(write-string "[no index]" stream)))
object)

(defmethod print-object ((object vcreator) stream)
(print-unreadable-object (object stream :type t)
(if (slot-boundp object '%prototype)
(prin1 (prototype object) stream)
(write-string "[no prototype]" stream))
(format stream " ~d" (index object)))
(if (slot-boundp object '%index)
(format stream " ~d" (index object))
(write-string " [no index]" stream)))
object)

;;; An instruction that performs some action for effect. This can include
Expand Down
Loading