Changeset 7945
- Timestamp:
- Dec 25, 2007, 11:54:16 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-clos-boot.lisp
r7888 r7945 1181 1181 1182 1182 (defun class-cell-typep (form class-cell) 1183 (unless (istruct-typep class-cell 'class-cell)1184 (report-bad-arg class-cell 'class-cell))1185 1183 (locally (declare (type class-cell class-cell)) 1186 1184 (let ((class (class-cell-class class-cell))) 1187 (when (not class) 1188 (setq class (find-class (class-cell-name class-cell) nil)) 1189 (when class (setf (class-cell-class class-cell) class))) 1190 (if class 1191 (not (null (memq class (%inited-class-cpl (class-of form))))) 1192 (if (fboundp 'typep)(typep form (class-cell-name class-cell)) t))))) 1185 (loop 1186 (if class 1187 (let* ((wrapper (if (%standard-instance-p form) 1188 (instance.class-wrapper form) 1189 (instance-class-wrapper form)))) 1190 (return 1191 (not (null (memq class (or (%wrapper-cpl wrapper) 1192 (%inited-class-cpl (%wrapper-class wrapper)))))))) 1193 (if (setq class (find-class (class-cell-name class-cell) nil)) 1194 (setf (class-cell-class class-cell) class) 1195 (return (typep form (class-cell-name class-cell))))))))) 1193 1196 1194 1197 … … 1303 1306 1304 1307 1305 #| 1308 #|| 1306 1309 ; This tended to cluster entries in gf dispatch tables too much. 1307 1310 (defvar *class-wrapper-hash-index* 0) … … 1314 1317 (%i+ index 3) ; '3 = 24 bytes = 6 longwords in lap. 1315 1318 1)))) 1316 | #1319 ||# 1317 1320 1318 1321 … … 1385 1388 (setf (%class.subclasses sup) (cons class (%class.subclasses sup)))) 1386 1389 (setf (%class.local-supers class) supers) 1387 (setf (%class.cpl class) (compute-cpl class)) 1388 (setf (%class.own-wrapper class) (%cons-wrapper class (new-class-wrapper-hash-index))) 1390 (let* ((wrapper (%cons-wrapper class (new-class-wrapper-hash-index))) 1391 (cpl (compute-cpl class))) 1392 (setf (%class.cpl class) cpl) 1393 (setf (%class.own-wrapper class) wrapper) 1394 (setf (%wrapper-cpl wrapper) cpl)) 1389 1395 (setf (%class.ctype class) (make-class-ctype class)) 1390 1396 (setf (find-class name) class) … … 2528 2534 (type-predicate (standard-effective-slot-definition.type-predicate slotd))) 2529 2535 (unless (or (eq new (%slot-unbound-marker)) 2536 (null type-predicate) 2530 2537 (funcall type-predicate new)) 2531 2538 (error 'bad-slot-type … … 2756 2763 (when forwarding-info 2757 2764 (setf (%wrapper-hash-index wrapper) 0 2765 (%wrapper-cpl wrapper) nil 2758 2766 (%wrapper-instance-slots wrapper) 0 2759 2767 (%wrapper-forwarding-info wrapper) forwarding-info … … 3435 3443 (setf (fdefinition '%do-remove-direct-method) #'remove-direct-method) 3436 3444 3445 (defmethod instance-class-wrapper (x) 3446 (%class.own-wrapper (class-of x))) 3447 3437 3448 (defmethod instance-class-wrapper ((instance standard-object)) 3438 3449 (if (%standard-instance-p instance) 3439 3450 (instance.class-wrapper instance) 3440 3451 (if (typep instance 'macptr) 3441 (foreign-instance-class-wrapper instance)))) 3452 (foreign-instance-class-wrapper instance) 3453 (%class.own-wrapper (class-of instance))))) 3442 3454 3443 3455 (defmethod instance-class-wrapper ((instance standard-generic-function))
Note:
See TracChangeset
for help on using the changeset viewer.
