Changeset 7946
- Timestamp:
- Dec 25, 2007, 11:56:38 PM (17 years ago)
- File:
-
- 1 edited
-
branches/working-0711/ccl/level-1/l1-clos.lisp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-clos.lisp
r7923 r7946 599 599 (class-finalized-p class) 600 600 (not (class-has-a-forward-referenced-superclass-p class))) 601 (update-cpl class (compute-class-precedence-list class)) 602 ;;; This -should- be made to work for structure classes 603 (update-slots class (compute-slots class)) 604 (setf (%class-default-initargs class) (compute-default-initargs class)) 605 (%flush-initargs-caches class) 606 ) 601 (let* ((cpl (update-cpl class (compute-class-precedence-list class)))) 602 ;; This -should- be made to work for structure classes 603 (update-slots class (compute-slots class)) 604 (setf (%class-default-initargs class) (compute-default-initargs class)) 605 (%flush-initargs-caches class) 606 (let* ((wrapper (%class-own-wrapper class))) 607 (when wrapper 608 (setf (%wrapper-cpl wrapper) cpl))))) 607 609 (unless finalizep 608 610 (dolist (sub (%class-direct-subclasses class)) … … 1103 1105 (:name slot-id :initform nil :initfunction ,#'false 1104 1106 :readers (slot-definition-slot-id)) 1105 (:name type-predicate :initform #'true1106 :initfunction ,#' (lambda () #'true)1107 (:name type-predicate :initform nil 1108 :initfunction ,#'false 1107 1109 :readers (slot-definition-predicate)) 1108 1110 ) … … 1192 1194 (add-direct-subclass c class))) 1193 1195 (setf (%class.local-supers class) new-supers))) 1194 (unless (%class-own-wrapper class) 1195 (setf (%class-own-wrapper class) (%cons-wrapper class))) 1196 (update-cpl class (compute-cpl class)))) 1196 (let* ((wrapper (or (%class-own-wrapper class) 1197 (setf (%class-own-wrapper class) (%cons-wrapper class)))) 1198 (cpl (compute-cpl class))) 1199 (setf (%wrapper-cpl wrapper) cpl)))) 1197 1200 1198 1201 … … 1716 1719 ;; Typecheck the new-value, then call 1717 1720 ;; (SETF SLOT-VALUE-USING-CLASS) 1718 (unless (funcall predicate new-value) 1721 (unless (or (null predicate) 1722 (funcall predicate new-value)) 1719 1723 (error 'bad-slot-type-from-initarg 1720 1724 :slot-definition slotd … … 1736 1740 (if initfunction 1737 1741 (let* ((newval (funcall initfunction))) 1738 (unless (funcall predicate newval) 1742 (unless (or (null predicate) 1743 (funcall predicate newval)) 1739 1744 (error 'bad-slot-type-from-initform 1740 1745 :slot-definition slotd … … 2034 2039 2035 2040 2041 2042 2036 2043 ;;; Return a lambda form or NIL. 2037 2044 (defun make-instantiate-lambda-for-class-cell (cell) … … 2061 2068 (if (null *typecheck-slots-in-optimized-make-instance*) 2062 2069 form 2063 (let* ((ctype (ignore-errors (specifier-type type)))) 2064 (if (or (null ctype) 2065 (eq ctype *universal-type*) 2066 (typep ctype 'unknown-ctype)) 2067 form 2068 (if spvar 2069 `(if ,spvar 2070 (require-type ,form ',type) 2071 (%slot-unbound-marker)) 2072 `(require-type ,form ',type))))))) 2070 (if spvar 2071 `(if ,spvar 2072 (require-type ,form ',type) 2073 (%slot-unbound-marker)) 2074 `(require-type ,form ',type))))) 2073 2075 (dolist (slot slotds) 2074 2076 (let* ((initarg (car (slot-definition-initargs slot)))
Note:
See TracChangeset
for help on using the changeset viewer.
