Changeset 15400
- Timestamp:
- May 31, 2012, 1:30:04 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/source/level-1/l1-clos-boot.lisp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/level-1/l1-clos-boot.lisp
r15311 r15400 1224 1224 1225 1225 1226 (defun std-instance-class-cell-typep (form class-cell)1226 (defun class-cell-typep (form class-cell) 1227 1227 (let* ((typecode (typecode form)) 1228 1228 (wrapper (cond ((= typecode target::subtag-instance) … … 1230 1230 ((= typecode target::subtag-basic-stream) 1231 1231 (basic-stream.wrapper form)) 1232 (t nil))))1232 (t (non-standard-instance-class-wrapper form))))) 1233 1233 (declare (type (unsigned-byte 8) typecode)) 1234 (when wrapper 1235 (loop 1234 (loop 1236 1235 (let ((class (class-cell-class class-cell))) 1237 1236 (if class … … 1251 1250 (if (and new-cell (not (eq class-cell new-cell))) 1252 1251 (setq class-cell new-cell class (class-cell-class class-cell)) 1253 (return (typep form name))))))))))) 1254 1255 (defun class-cell-typep (form class-cell) 1256 (locally (declare (type class-cell class-cell)) 1257 (loop 1258 (let ((class (class-cell-class class-cell))) 1259 (if class 1260 (let* ((ordinal (%class-ordinal class)) 1261 (wrapper (instance-class-wrapper form)) 1262 (bits (or (%wrapper-cpl-bits wrapper) 1263 (make-cpl-bits (%inited-class-cpl (%wrapper-class wrapper)))))) 1264 (declare (fixnum ordinal)) 1265 (return 1266 (if bits 1267 (locally (declare (simple-bit-vector bits) 1268 (optimize (speed 3) (safety 0))) 1269 (if (< ordinal (length bits)) 1270 (not (eql 0 (sbit bits ordinal)))))))) 1271 (let* ((name (class-cell-name class-cell)) 1272 (new-cell (find-class-cell name nil))) 1273 (unless 1274 (if (and new-cell (not (eq class-cell new-cell))) 1275 (setq class-cell new-cell class (class-cell-class class-cell)) 1276 (return (typep form name)))))))))) 1252 (return (typep form name)))))))))) 1253 1254 1255 (%fhave 'std-instance-class-cell-typep #'class-cell-typep) 1277 1256 1278 1257 … … 1281 1260 (if (class-cell-typep arg class-cell) 1282 1261 arg 1283 (%kernel-restart $xwrongtype arg (c arclass-cell))))1262 (%kernel-restart $xwrongtype arg (class-cell-class class-cell)))) 1284 1263 1285 1264 … … 1498 1477 (defun make-cpl-bits (cpl) 1499 1478 (declare (optimize speed)) 1500 (when cpl 1479 (when cpl 1501 1480 (let* ((max 0)) 1502 1481 (declare (fixnum max)) … … 2503 2482 (and (classp c1) 2504 2483 (classp c2) 2505 (not (null (memq c2 ( %inited-class-cpl c1 t))))))2484 (not (null (memq c2 (or (%class-cpl c1) (ignore-errors (%inited-class-cpl c1 t)))))))) 2506 2485 2507 2486 (defun %class-get (class indicator &optional default)
Note:
See TracChangeset
for help on using the changeset viewer.
