Changeset 284
- Timestamp:
- Jan 13, 2004, 5:04:46 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-clos.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-clos.lisp
r242 r284 19 19 ;;; At this point in the load sequence, the handful of extant basic classes 20 20 ;;; exist only in skeletal form (without direct or effective slot-definitions.) 21 21 (in-package "CCL") 22 22 23 23 (defun extract-slotds-with-allocation (allocation slotds) … … 58 58 (unless (or (listp slot-names) (eq slot-names t)) 59 59 (report-bad-arg slot-names '(or list (eql t)))) 60 (unless (plistp initargs) (report-bad-arg initargs '(satisfies plistp))) 60 ;; Check that initargs contains valid key/value pairs, 61 ;; signal a PROGRAM-ERROR otherwise. (Yes, this is 62 ;; an obscure way to do so.) 63 (destructuring-bind (&key &allow-other-keys) initargs) 61 64 (let* ((wrapper (instance.class-wrapper instance)) 62 65 (class (%wrapper-class wrapper))) … … 654 657 (apply #'ensure-class-using-class (find-class name nil) name keys)) 655 658 659 (defparameter *defclass-redefines-improperly-named-classes-pedantically* 660 t 661 "ANSI CL expects DEFCLASS to redefine an existing class only when 662 the existing class is properly named, the MOP function ENSURE-CLASS 663 redefines existing classes regardless of their CLASS-NAME. This variable 664 governs whether DEFCLASS makes that distinction or not.") 665 666 (defun ensure-class-for-defclass (name &rest keys &key &allow-other-keys) 667 (record-source-file name 'class) 668 ;; Maybe record source-file information for accessors as well 669 ;; We should probably record them as "accessors of the class", since 670 ;; there won't be any other explicit defining form associated with 671 ;; them. 672 (let* ((existing-class (find-class name nil))) 673 (when (and *defclass-redefines-improperly-named-classes-pedantically* 674 existing-class 675 (not (eq (class-name existing-class) name))) 676 ;; Class isn't properly named; act like it didn't exist 677 (setq existing-class nil)) 678 (apply #'ensure-class-using-class existing-class name keys))) 679 656 680 657 681 (defun slot-plist-from-%slotd (%slotd allocation) … … 848 872 :direct-slots 849 873 `((:name prototype :initform nil :initfunction ,#'false) 850 (:name name :initargs (:name) :initform nil :initfunction ,#'false :readers (class-name) :writers ((setf class-name)))874 (:name name :initargs (:name) :initform nil :initfunction ,#'false :readers (class-name)) 851 875 (:name precedence-list :initargs (:precedence-list) :initform nil :initfunction ,#'false) 852 876 (:name own-wrapper :initargs (:own-wrapper) :initform nil :initfunction ,#'false :readers (class-own-wrapper)) … … 1456 1480 `(ensure-slot-id ,(slot-id.name s))) 1457 1481 1482 1483 (defmethod (setf class-name) (new (class class)) 1484 (reinitialize-instance class :name new) 1485 new)
Note:
See TracChangeset
for help on using the changeset viewer.
