Changeset 421


Ignore:
Timestamp:
Jan 30, 2004, 11:34:07 AM (21 years ago)
Author:
Gary Byers
Message:

ADD-READER/WRITER-METHOD: less specialized. Turn a few early accessors
into GFs; writer methods on some slots.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-clos.lisp

    r412 r421  
    771771  *standard-reader-method-class*)
    772772
    773 (defmethod add-reader-method ((class std-class) gf dslotd)
     773(defmethod add-reader-method ((class slots-class) gf dslotd)
    774774  (let* ((initargs
    775775          `(:qualifiers nil
     
    805805
    806806
    807 (defmethod add-writer-method ((class std-class) gf dslotd)
     807(defmethod add-writer-method ((class slots-class) gf dslotd)
    808808  (let* ((initargs
    809809          `(:qualifiers nil
     
    870870   (:name name :initargs (:name) :initform nil :initfunction ,#'false :readers (class-name))
    871871   (:name precedence-list :initargs (:precedence-list) :initform nil  :initfunction ,#'false)
    872    (:name own-wrapper :initargs (:own-wrapper) :initform nil  :initfunction ,#'false :readers (class-own-wrapper))
     872   (:name own-wrapper :initargs (:own-wrapper) :initform nil  :initfunction ,#'false :readers (class-own-wrapper) :writers ((setf class-own-wrapper)))
    873873   (:name direct-superclasses :initargs (:direct-superclasses) :initform nil  :initfunction ,#'false :readers (class-direct-superclasses))
    874874   (:name direct-subclasses :initargs (:direct-subclasses) :initform nil  :initfunction ,#'false :readers (class-direct-subclasses))
     
    893893 :direct-superclasses '(class)
    894894 :direct-slots `((:name direct-slots :initform nil :initfunction ,#'false
    895                   :initargs (:direct-slots) :readers (class-direct-slots))
     895                  :initargs (:direct-slots) :readers (class-direct-slots)
     896                  :writers ((setf class-direct-slots)))
    896897                 (:name slots :initform nil :initfunction ,#'false
    897898                   :readers (class-slots))
     
    11651166      (fdefinition '%class-direct-slots) #'class-direct-slots
    11661167      (fdefinition '(setf %class-direct-slots))
    1167                    #'(lambda (new class)
    1168                        (if (typep class 'slots-class)
    1169                          (setf (slot-value class 'direct-slots) new)
    1170                          new))
     1168                   #'(setf class-direct-slots)
    11711169      (fdefinition '%class-slots) #'class-slots
    11721170      (fdefinition '%class-direct-superclasses) #'class-direct-superclasses
     
    11751173          (setf (slot-value class 'direct-superclasses) new))
    11761174      (fdefinition '%class-direct-subclasses) #'class-direct-subclasses
     1175      (fdefinition '%class-own-wrapper) #'class-own-wrapper
     1176      (fdefinition '(setf %class-own-wrapper)) #'(setf class-own-wrapper)
    11771177)
    11781178
    1179  
     1179
     1180
    11801181(setf (fdefinition '%slot-definition-name) #'slot-definition-name
    11811182      (fdefinition '%slot-definition-type) #'slot-definition-type
Note: See TracChangeset for help on using the changeset viewer.