;;;; Bootstrap for the lisp-stream change, load this file without ;;;; compiling from the bootstrap file after loading exports.lisp. (in-package "LISP") (defclass fundamental-stream ()) (let ((class (find-class 'stream)) (class-cell (info type class 'stream))) (kernel:%instance-set class-cell 1 'lisp-stream) (setf (info type kind 'lisp-stream) :instance) (setf (class-name class) 'lisp-stream) (setf (info type class 'lisp-stream) class-cell) (setf (info type builtin 'lisp-stream) class) (setf (info type compiler-layout 'lisp-stream) (info type compiler-layout 'stream)) (setf (info type class 'stream) nil) (setf (info type kind 'stream) nil) (setf (info type builtin 'stream) nil) (setf (info type compiler-layout 'stream) nil)) (defstruct (lisp-stream (:predicate streamp) (:print-function %print-stream)) ;; ;; Buffered input. (in-buffer nil :type (or in-buffer-type null)) (in-index in-buffer-length :type index) ; Index into in-buffer (in #'ill-in :type function) ; Read-Char function (bin #'ill-bin :type function) ; Byte input function (n-bin #'ill-bin :type function) ; N-Byte input function (out #'ill-out :type function) ; Write-Char function (bout #'ill-bout :type function) ; Byte output function (sout #'ill-out :type function) ; String output function (misc #'do-nothing :type function)) ; Less used methods (deftype stream () 'lisp-stream) ;;;; Once the lisp-stream type is setup, modify stream from ;;;; lisp-stream to (or lisp-stream fundamental-stream) (in-package "LISP") (eval-when (compile load eval) (defclass fundamental-stream ()) (setf (info type kind 'stream) :defined) (setf (info type builtin 'stream) nil)) (deftype stream () '(or sys:lisp-stream sys:fundamental-stream))