Changeset 750
- Timestamp:
- Apr 2, 2004, 9:44:35 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-clos.lisp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-clos.lisp
r732 r750 413 413 414 414 ;;; Standard classes are finalized if they have a wrapper and that 415 ;;; wrapper as an instance-slots vector; that implies that415 ;;; wrapper has an instance-slots vector; that implies that 416 416 ;;; both UPDATE-CPL and UPDATE-SLOTS have been called on the class. 417 417 (defmethod class-finalized-p ((class std-class)) … … 464 464 (unless (eq (%slot-definition-name (car sup-slotds)) 465 465 (%slot-definition-name (car primary-slotds))) 466 (format t "~&name of sup-slotds = ~s, name of prim = ~s"467 (%slot-definition-name (car sup-slotds))468 (%slot-definition-name (car primary-slotds)))469 466 (error "While initializing ~s:~%~ 470 467 attempt to mix incompatible primary classes:~%~ … … 500 497 501 498 502 (defun class-has-a-forward-referenced-superclass-p (class) 503 (or (if (forward-referenced-class-p class) class) 504 (dolist (s (%class-direct-superclasses class)) 505 (let* ((fwdref (class-has-a-forward-referenced-superclass-p s))) 506 (when fwdref (return fwdref)))))) 499 (defun class-has-a-forward-referenced-superclass-p (original) 500 (labels ((scan-forward-refs (class seen) 501 (unless (memq class seen) 502 (or (if (forward-referenced-class-p class) class) 503 (progn 504 (push class seen) 505 (dolist (s (%class-direct-superclasses class)) 506 (when (eq s original) 507 (error "circular class hierarchy: the class ~s is a superclass of at least one of its superclasses (~s)." original class)) 508 (let* ((fwdref (scan-forward-refs s seen))) 509 (when fwdref (return fwdref))))))))) 510 (scan-forward-refs original ()))) 507 511 508 512 … … 538 542 (finalize-inheritance class) 539 543 (return-from update-class)) 540 541 544 (when (or finalizep 542 545 (class-finalized-p class) … … 671 674 (multiple-value-bind (metaclass initargs) 672 675 (ensure-class-metaclass-and-initargs class keys) 673 ( change-class class metaclass)676 (apply #'change-class class metaclass initargs) 674 677 (apply #'reinitialize-instance class initargs) 675 678 (setf (find-class name) class))) … … 1228 1231 (fdefinition '%method-lambda-list) #'method-lambda-list 1229 1232 ) 1233 1234 (setf (fdefinition '%add-method) #'add-method) 1230 1235 1231 1236
Note:
See TracChangeset
for help on using the changeset viewer.
