- (dolist (x '(;; FIXME: The mysterious duplication of STREAM in the
- ;; list here here was introduced in sbcl-0.6.12.33, in
- ;; MNA's port of DTC's inline-type-tests patches for
- ;; CMU CL. I'm guessing that it has something to do
- ;; with preallocating just enough space in a table
- ;; later used by the final definition of
- ;; FUNDAMENTAL-STREAM (perhaps for Gray stream stuff?).
- ;; It'd be good to document this weirdness both here
- ;; and in the REGISTER-LAYOUT code which has to do the
- ;; right thing with the duplicates-containing
- ;; INHERITS-LIST.
+ (dolist (x '(;; Why is STREAM duplicated in this list? Because, when
+ ;; the inherits-vector of FUNDAMENTAL-STREAM is set up,
+ ;; a vector containing the elements of the list below,
+ ;; i.e. '(T INSTANCE STREAM STREAM), is created, and
+ ;; this is what the function ORDER-LAYOUT-INHERITS
+ ;; would do, too.
+ ;;
+ ;; So, the purpose is to guarantee a valid layout for
+ ;; the FUNDAMENTAL-STREAM class, matching what
+ ;; ORDER-LAYOUT-INHERITS would do.
+ ;; ORDER-LAYOUT-INHERITS would place STREAM at index 3
+ ;; in the INHERITS(-VECTOR). Index 2 would not be
+ ;; filled, so STREAM is duplicated there (as
+ ;; ORDER-LAYOUTS-INHERITS would do). Maybe the
+ ;; duplicate definition could be removed (removing a
+ ;; STREAM element), because FUNDAMENTAL-STREAM is
+ ;; redefined after PCL is set up, anyway. But to play
+ ;; it safely, we define the class with a valid INHERITS
+ ;; vector.