[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BUG and FIX? for PCL 1/19/87



There seems to be an error in the 'collect-slotds' method for
'basic-class' in the 1/19/87 and 12/2/86 versions of PCL.
This causes slots to be inherited incorrectly.

In the old PCL (11/11/86), the 'shadow-or-add-slot' for 'local-slots'
was done before the 'shadow-or-add-slot' calls for the supers; now
it is done afterwards.  Was this change intensional?  It causes the following
to happen:

Lisp> (defclass bob () ((a :initform 12)) (:accessor-prefix ||))
BOB
Lisp> (defclass bill (bob) ((a :initform 23)) (:accessor-prefix ||))
BILL
Lisp> (make-bill)
#S(BILL A 12)     <- should be #S(BILL A 23)

Changing 'collect-slotds' back to the old ordering solves this problem...

		Rick Spickelmier
		UC Berkeley
		

P.S.  at the bottom of this message are the changes to PCL to make it
run on VAXLISP/ULTRIX.


collect-slotds (from pcl of 1/19/87):

      (iterate ((ls in (cdr cpl)))
        (iterate ((instance-slot in (class-instance-slots ls)))
          (shadow-or-add-slot instance-slot all-slots))
        (iterate ((non-instance-slot in (class-non-instance-slots ls)))
          (shadow-or-add-slot non-instance-slot all-slots)))
      (iterate ((include-slot in include-slots))
        (shadow-or-add-slot include-slot all-slots
	  rplaca
          (error
	    "The slot ~S appeared in the :include option of the defstruct~%~
             for the class ~S. But this slot does not appear in any of the~%~
             class's superclasses."
	    (slotd-name include-slot)
	    (class-name class))))
->    (iterate ((local-slot in local-slots))
        (shadow-or-add-slot local-slot all-slots))

pcl of 11/11/86

->    (iterate ((local-slot in local-slots))
        (shadow-or-add-slot local-slot all-slots))
      (iterate ((ls in (cdr cpl)))
        (iterate ((instance-slot in (class-instance-slots ls)))
          (shadow-or-add-slot instance-slot all-slots))
        (iterate ((non-instance-slot in (class-non-instance-slots ls)))
          (shadow-or-add-slot non-instance-slot all-slots)))
      (iterate ((include-slot in include-slots))
        (shadow-or-add-slot include-slot all-slots
	  rplaca
          (error
	    "The slot ~S appeared in the :include option of the defstruct~%~
             for the class ~S. But this slot does not appear in any of the~%~
             class's superclasses."
	    (slotd-name include-slot)
	    (class-name class))))


VAXLISP/ULTRIX fixes

GET RID OF THE 'IGNORE' DEFMACRO - causes fits for VAXLISP

In defsys.lsp, for *pcl-pathname-defaults*
	#+(and DEC common vax VMS) (pathname "[gregor]")
	#+(and DEC common vax ULTRIX) (pathname "/eros1/ricks/pcl/new/")


for *pathname-extensions*
		       #+(and dec common VMS)    ("LSP"   . "FAS")
		       #+(and dec common ULTRIX)    ("lsp"   . "fas")