Changeset 5226
- Timestamp:
- Sep 20, 2006, 3:15:42 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (30 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r5212 r5226 372 372 (encode-output-function nil) 373 373 (decode-input-function nil) 374 (read-char-when-locked-function nil)374 (read-char-when-locked-function 'ioblock-no-char-input) 375 375 (write-simple-string-function 'ioblock-no-char-output) 376 376 (character-read-vector-function 'ioblock-no-char-input) 377 377 (read-line-function 'ioblock-no-char-input) 378 (write-char-when-locked-function nil)379 (read-byte-when-locked-function nil)380 (write-byte-when-locked-function nil)378 (write-char-when-locked-function 'ioblock-no-char-output) 379 (read-byte-when-locked-function 'ioblock-no-binary-input) 380 (write-byte-when-locked-function 'ioblock-no-binary-output) 381 381 (reserved1 nil) 382 382 (reserved2 nil) … … 442 442 443 443 444 ;;; Should only be called with the ioblock locked, if that's necessary. 445 446 (defun %ioblock-read-byte (ioblock) 447 (declare (optimize (speed 3) (safety 0))) 448 ;;; It's so dumb to be dealing with the effect of UNREAD-CHAR 449 ;;; on a binary stream, but since this is kind of a general 450 ;;; method, we kind of have to here. 451 (if (ioblock-untyi-char ioblock) 452 (prog1 (%char-code (ioblock-untyi-char ioblock)) 453 (setf (ioblock-untyi-char ioblock) nil)) 454 (let* ((buf (ioblock-inbuf ioblock)) 455 (idx (io-buffer-idx buf)) 456 (limit (io-buffer-count buf))) 457 (declare (fixnum idx limit)) 458 (when (= idx limit) 459 (unless (%ioblock-advance ioblock t) 460 (return-from %ioblock-read-byte :eof)) 461 (setq idx (io-buffer-idx buf) 462 limit (io-buffer-count buf))) 463 (setf (io-buffer-idx buf) (the fixnum (1+ idx))) 464 (uvref (io-buffer-buffer buf) idx)))) 444 465 445 466 446 … … 683 663 ) 684 664 685 (declaim (inline %ioblock-read-swapped-u16- byte))686 (defun %ioblock-read-swapped-u16- byte(ioblock)665 (declaim (inline %ioblock-read-swapped-u16-element)) 666 (defun %ioblock-read-swapped-u16-element (ioblock) 687 667 (declare (optimize (speed 3) (safety 0))) 688 668 (let* ((buf (ioblock-inbuf ioblock)) … … 692 672 (when (= idx limit) 693 673 (unless (%ioblock-advance ioblock t) 694 (return-from %ioblock-read-swapped-u16- byte:eof))674 (return-from %ioblock-read-swapped-u16-element :eof)) 695 675 (setq idx (io-buffer-idx buf) 696 676 limit (io-buffer-count buf))) 697 677 (setf (io-buffer-idx buf) (the fixnum (1+ idx))) 698 (let* ((u16 (aref (the (simple-array (unsigned-byte 16) (*)) 699 (io-buffer-buffer buf)) idx))) 700 (declare (type (unsigned-byte 16) u16)) 701 (logand #xffff (the fixnum (logior (the fixnum (ash u16 -8)) 702 (the fixnum (ash u16 8)))))))) 678 (%swap-u16 (aref (the (simple-array (unsigned-byte 16) (*)) 679 (io-buffer-buffer buf)) idx)))) 680 681 (declaim (inline %ioblock-read-swapped-u32-element)) 682 (defun %ioblock-read-swapped-u32-element (ioblock) 683 (declare (optimize (speed 3) (safety 0))) 684 (let* ((buf (ioblock-inbuf ioblock)) 685 (idx (io-buffer-idx buf)) 686 (limit (io-buffer-count buf))) 687 (declare (fixnum idx limit)) 688 (when (= idx limit) 689 (unless (%ioblock-advance ioblock t) 690 (return-from %ioblock-read-swapped-u32-element :eof)) 691 (setq idx (io-buffer-idx buf) 692 limit (io-buffer-count buf))) 693 (setf (io-buffer-idx buf) (the fixnum (1+ idx))) 694 (%swap-u32 (aref (the (simple-array (unsigned-byte 32) (*)) 695 (io-buffer-buffer buf)) idx)))) 703 696 704 697 … … 729 722 (defun %bivalent-locked-ioblock-read-u8-byte (ioblock) 730 723 (declare (optimize (speed 3) (safety 0))) 731 (with-ioblock-lock-grabbed ((locally (declare (optimize (speed 3) (safety 0))) 732 (ioblock-inbuf-lock ioblock))) 724 (with-ioblock-input-lock-grabbed (ioblock) 733 725 (if (ioblock-untyi-char ioblock) 734 726 (prog1 (%char-code (ioblock-untyi-char ioblock)) … … 1114 1106 (setf (aref (the (simple-array (unsigned-byte 16) (*)) 1115 1107 (io-buffer-buffer buf)) idx) 1116 (logand #xffff (the fixnum (logior (the fixnum (ash element -8)) 1117 (the fixnum (ash element 8)))))) 1108 (%swap-u16 element)) 1118 1109 (incf idx) 1119 1110 (setf (io-buffer-idx buf) idx) … … 1154 1145 (setq idx 0 count 0)) 1155 1146 (setf (aref (the (simple-array (unsigned-byte 32) (*)) (io-buffer-buffer buf)) idx) element) 1147 (incf idx) 1148 (setf (io-buffer-idx buf) idx) 1149 (when (> idx count) 1150 (setf (io-buffer-count buf) idx)) 1151 (setf (ioblock-dirty ioblock) t) 1152 element)) 1153 1154 (declaim (inline %ioblock-write-swapped-u32-element)) 1155 (defun %ioblock-write-swapped-u32-element (ioblock element) 1156 (declare (optimize (speed 3) (safety 0))) 1157 (let* ((buf (ioblock-outbuf ioblock)) 1158 (idx (io-buffer-idx buf)) 1159 (count (io-buffer-count buf)) 1160 (limit (io-buffer-limit buf))) 1161 (declare (fixnum idx limit count)) 1162 (when (= idx limit) 1163 (%ioblock-force-output ioblock nil) 1164 (setq idx 0 count 0)) 1165 (setf (aref (the (simple-array (unsigned-byte 32) (*)) (io-buffer-buffer buf)) idx) 1166 (%swap-u32 element)) 1156 1167 (incf idx) 1157 1168 (setf (io-buffer-idx buf) idx) … … 1269 1280 1270 1281 1271 (defun %ioblock- u8-encoded-write-simple-string (ioblock string start-char num-chars)1282 (defun %ioblock-write-u8-encoded-simple-string (ioblock string start-char num-chars) 1272 1283 (declare (fixnum start-char num-chars) 1273 1284 (simple-base-strng string) … … 1290 1301 (funcall encode-function char #'%ioblock-write-u8-element ioblock))))) 1291 1302 1303 (declaim (inline %ioblock-write-u16-encoded-char)) 1304 (defun %ioblock-write-u16-encoded-char (ioblock char) 1305 (declare (optimize (speed 3) (safety 0))) 1306 (if (eq char #\linefeed) 1307 (setf (ioblock-charpos ioblock) 0) 1308 (incf (ioblock-charpos ioblock))) 1309 (let* ((code (char-code char))) 1310 (declare (type (mod #x110000) code)) 1311 (if (< code (the fixnum (ioblock-literal-char-code-limit ioblock))) 1312 (%ioblock-write-u16-element ioblock code) 1313 (funcall (ioblock-encode-output-function ioblock) 1314 char 1315 #'%ioblock-write-u16-element 1316 ioblock)))) 1317 1318 (defun %private-ioblock-write-u16-encoded-char (ioblock char) 1319 (declare (optimize (speed 3) (safety 0))) 1320 (check-ioblock-owner ioblock) 1321 (%ioblock-write-u16-encoded-char ioblock char)) 1322 1323 (defun %locked-ioblock-write-u16-encoded-char (ioblock char) 1324 (declare (optimize (speed 3) (safety 0))) 1325 (with-ioblock-output-lock-grabbed (ioblock) 1326 (%ioblock-write-u16-encoded-char ioblock char))) 1327 1328 (defun %ioblock-write-u16-encoded-simple-string (ioblock string start-char num-chars) 1329 (declare (fixnum start-char num-chars) 1330 (simple-base-strng string) 1331 (optimize (speed 3) (safety 0))) 1332 (do* ((i 0 (1+ i)) 1333 (col (ioblock-charpos ioblock)) 1334 (limit (ioblock-literal-char-code-limit ioblock)) 1335 (encode-function (ioblock-encode-output-function ioblock)) 1336 (start-char start-char (1+ start-char))) 1337 ((= i num-chars) (setf (ioblock-charpos ioblock) col) num-chars) 1338 (declare (fixnum i start-char limit)) 1339 (let* ((char (schar string start-char)) 1340 (code (char-code char))) 1341 (declare (type (mod #x110000) code)) 1342 (if (eq char #\newline) 1343 (setq col 0) 1344 (incf col)) 1345 (if (< code limit) 1346 (%ioblock-write-u16-element ioblock code) 1347 (funcall encode-function char #'%ioblock-write-u16-element ioblock))))) 1348 1349 (declaim (inline %ioblock-write-swapped-u16-encoded-char)) 1350 (defun %ioblock-write-swapped-u16-encoded-char (ioblock char) 1351 (declare (optimize (speed 3) (safety 0))) 1352 (if (eq char #\linefeed) 1353 (setf (ioblock-charpos ioblock) 0) 1354 (incf (ioblock-charpos ioblock))) 1355 (let* ((code (char-code char))) 1356 (declare (type (mod #x110000) code)) 1357 (if (< code (the fixnum (ioblock-literal-char-code-limit ioblock))) 1358 (%ioblock-write-swapped-u16-element ioblock code) 1359 (funcall (ioblock-encode-output-function ioblock) 1360 char 1361 #'%ioblock-write-swapped-u16-element 1362 ioblock)))) 1363 1364 (defun %private-ioblock-write-swapped-u16-encoded-char (ioblock char) 1365 (declare (optimize (speed 3) (safety 0))) 1366 (check-ioblock-owner ioblock) 1367 (%ioblock-write-swapped-u16-encoded-char ioblock char)) 1368 1369 (defun %locked-ioblock-write-swapped-u16-encoded-char (ioblock char) 1370 (declare (optimize (speed 3) (safety 0))) 1371 (with-ioblock-output-lock-grabbed (ioblock) 1372 (%ioblock-write-swapped-u16-encoded-char ioblock char))) 1373 1374 1375 1376 1292 1377 (declaim (inline %ioblock-write-u8-byte)) 1293 1378 (defun %ioblock-write-u8-byte (ioblock byte) 1294 1379 (declare (optimize (speed 3) (safety 0))) 1295 (if (= byte (logand #xff byte)) 1296 (%ioblock-write-u8-element ioblock byte) 1297 (error "~s doesn't match stream element-type of ~s". (byte (ioblock-stream ioblock))))) 1380 (%ioblock-write-u8-element ioblock (require-type byte '(unsigned-byte 8)))) 1298 1381 1299 1382 (defun %private-ioblock-write-u8-byte (ioblock byte) … … 1310 1393 (defun %ioblock-write-s8-byte (ioblock byte) 1311 1394 (declare (optimize (speed 3) (safety 0))) 1312 (if (and (typep byte 'fixnum) 1313 (>= (the fixnum byte) -128) 1314 (< (the fixnum byte) 128)) 1315 (%ioblock-write-s8-element ioblock byte) 1316 (error "~s doesn't match stream element-type of ~s". (byte (ioblock-stream ioblock))))) 1395 (%ioblock-write-s8-element ioblock (require-type byte '(signed-byte 8)))) 1317 1396 1318 1397 (defun %private-ioblock-write-s8-byte (ioblock byte) … … 1329 1408 (defun %ioblock-write-u16-byte (ioblock byte) 1330 1409 (declare (optimize (speed 3) (safety 0))) 1331 (if (= byte (logand #xffff byte)) 1332 (%ioblock-write-u16-element ioblock byte) 1333 (error "~s doesn't match stream element-type of ~s". (byte (ioblock-stream ioblock))))) 1410 (%ioblock-write-u16-element ioblock (require-type byte '(unsigned-byte 16)))) 1334 1411 1335 1412 (defun %private-ioblock-write-u16-byte (ioblock byte) … … 1346 1423 (defun %ioblock-write-s16-byte (ioblock byte) 1347 1424 (declare (optimize (speed 3) (safety 0))) 1348 (if (and (typep byte 'fixnum) 1349 (>= (the fixnum byte) -32768) 1350 (< (the fixnum byte) 32768)) 1351 (%ioblock-write-s16-element ioblock byte) 1352 (error "~s doesn't match stream element-type of ~s". (byte (ioblock-stream ioblock))))) 1425 (%ioblock-write-s16-element ioblock (require-type byte '(signed-byte 16)))) 1353 1426 1354 1427 (defun %private-ioblock-write-s16-byte (ioblock byte) … … 1362 1435 (%ioblock-write-s16-byte ioblock byte))) 1363 1436 1364 1437 (declaim (inline %ioblock-write-u32-byte)) 1438 (defun %ioblock-write-u32-byte (ioblock byte) 1439 (declare (optimize (speed 3) (safety 0))) 1440 (%ioblock-write-u32-element ioblock (require-type byte '(unsigned-byte 32)))) 1441 1442 (defun %private-ioblock-write-u32-byte (ioblock byte) 1443 (declare (optimize (speed 3) (safety 0))) 1444 (check-ioblock-owner ioblock) 1445 (%ioblock-write-u32-byte ioblock byte)) 1446 1447 (defun %locked-ioblock-write-u32-byte (ioblock byte) 1448 (declare (optimize (speed 3) (safety 0))) 1449 (with-ioblock-output-lock-grabbed (ioblock) 1450 (%ioblock-write-u32-byte ioblock byte))) 1451 1452 (declaim (inline %ioblock-write-s32-byte)) 1453 (defun %ioblock-write-s32-byte (ioblock byte) 1454 (declare (optimize (speed 3) (safety 0))) 1455 (%ioblock-write-s32-element ioblock (require-type byte '(signed-byte 32)))) 1456 1457 (defun %private-ioblock-write-s32-byte (ioblock byte) 1458 (declare (optimize (speed 3) (safety 0))) 1459 (check-ioblock-owner ioblock) 1460 (%ioblock-write-s32-byte ioblock byte)) 1461 1462 (defun %locked-ioblock-write-s32-byte (ioblock byte) 1463 (declare (optimize (speed 3) (safety 0))) 1464 (with-ioblock-output-lock-grabbed (ioblock) 1465 (%ioblock-write-s32-byte ioblock byte))) 1466 1467 #+64-bit-target 1468 (progn 1469 (declaim (inline %ioblock-write-u64-byte)) 1470 (defun %ioblock-write-u64-byte (ioblock byte) 1471 (declare (optimize (speed 3) (safety 0))) 1472 (%ioblock-write-u64-element ioblock (require-type byte '(unsigned-byte 64)))) 1473 1474 (defun %private-ioblock-write-u64-byte (ioblock byte) 1475 (declare (optimize (speed 3) (safety 0))) 1476 (check-ioblock-owner ioblock) 1477 (%ioblock-write-u64-byte ioblock byte)) 1478 1479 (defun %locked-ioblock-write-u64-byte (ioblock byte) 1480 (declare (optimize (speed 3) (safety 0))) 1481 (with-ioblock-output-lock-grabbed (ioblock) 1482 (%ioblock-write-u64-byte ioblock byte))) 1483 1484 (declaim (inline %ioblock-write-s64-byte)) 1485 (defun %ioblock-write-s64-byte (ioblock byte) 1486 (declare (optimize (speed 3) (safety 0))) 1487 (%ioblock-write-s64-element ioblock (require-type byte '(signed-byte 64)))) 1488 1489 (defun %private-ioblock-write-s64-byte (ioblock byte) 1490 (declare (optimize (speed 3) (safety 0))) 1491 (check-ioblock-owner ioblock) 1492 (%ioblock-write-s64-byte ioblock byte)) 1493 1494 (defun %locked-ioblock-write-s64-byte (ioblock byte) 1495 (declare (optimize (speed 3) (safety 0))) 1496 (with-ioblock-output-lock-grabbed (ioblock) 1497 (%ioblock-write-s64-byte ioblock byte))) 1498 ) ;#+64-bit-target 1365 1499 1366 1500 (defun %ioblock-clear-output (ioblock) … … 1449 1583 (declare (fixnum start end)) 1450 1584 (let* ((in (ioblock-inbuf ioblock)) 1451 (inbuf (io-buffer-buffer in))) 1585 (inbuf (io-buffer-buffer in)) 1586 (rbf (ioblock-read-byte-when-locked-function ioblock))) 1452 1587 (if (not (= (the fixnum (typecode inbuf)) 1453 1588 (the fixnum (typecode vector)))) … … 1455 1590 ((= i end) i) 1456 1591 (declare (fixnum i)) 1457 (let* ((b ( %ioblock-read-byteioblock)))1592 (let* ((b (funcall rbf ioblock))) 1458 1593 (if (eq b :eof) 1459 1594 (return i) … … 1463 1598 ((= i end) end) 1464 1599 (declare (fixnum i need)) 1465 (let* (( ch (%ioblock-read-byteioblock)))1466 (if (eq ch:eof)1600 (let* ((b (funcall rbf ioblock))) 1601 (if (eq b :eof) 1467 1602 (return i)) 1468 (setf (uvref vector i) ch)1603 (setf (uvref vector i) b) 1469 1604 (incf i) 1470 1605 (decf need) … … 1527 1662 (error "Can't read vector from stream ~s" (ioblock-stream ioblock))) 1528 1663 (do* ((i start) 1664 (rbf (ioblock-read-byte-when-locked-function ioblock)) 1529 1665 (in (ioblock-inbuf ioblock)) 1530 1666 (inbuf (io-buffer-buffer in)) … … 1533 1669 ((= i end) nb) 1534 1670 (declare (fixnum i end need)) 1535 (let* ((b ( %ioblock-read-byteioblock)))1671 (let* ((b (funcall rbf ioblock))) 1536 1672 (if (eq b :eof) 1537 1673 (return (- i start))) … … 1590 1726 (ecase unit-size 1591 1727 (8 1728 (setf (ioblock-read-char-when-locked-function ioblock) 1729 '%ioblock-read-u8-encoded-char) 1592 1730 (case sharing 1593 1731 (:private '%private-ioblock-read-u8-encoded-char) … … 1600 1738 (:lock '%locked-ioblock-tyi) 1601 1739 (t '%ioblock-tyi))) 1740 (setf (ioblock-read-char-when-locked-function ioblock) 1741 '%ioblock-tyi) 1602 1742 (setf (ioblock-character-read-vector-function ioblock) 1603 1743 '%ioblock-unencoded-character-read-vector) … … 1612 1752 (if character-p 1613 1753 ;; The bivalent case, at least for now 1614 (case sharing 1615 (:private '%bivalent-private-ioblock-read-u8-byte) 1616 (:lock '%bivalent-locked-ioblock-read-u8-byte) 1617 (t '%bivalent-ioblock-read-u8-byte)) 1618 (case sharing 1619 (:private '%private-ioblock-read-u8-byte) 1620 (:lock '%locked-ioblock-read-u8-byte) 1621 (t '%ioblock-read-u8-byte)))) 1754 (progn 1755 (setf (ioblock-read-byte-when-locked-function ioblock) 1756 '%bivalent-ioblock-read-u8-byte) 1757 (case sharing 1758 (:private '%bivalent-private-ioblock-read-u8-byte) 1759 (:lock '%bivalent-locked-ioblock-read-u8-byte) 1760 (t '%bivalent-ioblock-read-u8-byte))) 1761 (progn 1762 (setf (ioblock-read-byte-when-locked-function ioblock) 1763 '%ioblock-read-u8-byte) 1764 (case sharing 1765 (:private '%private-ioblock-read-u8-byte) 1766 (:lock '%locked-ioblock-read-u8-byte) 1767 (t '%ioblock-read-u8-byte))))) 1622 1768 ((= subtag target::subtag-s8-vector) 1623 (case sharing 1624 (:private '%private-ioblock-read-s8-byte) 1625 (:lock '%locked-ioblock-read-s8-byte) 1626 (t '%ioblock-read-s8-byte))) 1769 (setf (ioblock-read-byte-when-locked-function ioblock) 1770 '%ioblock-read-s8-byte) 1771 (case sharing 1772 (:private '%private-ioblock-read-s8-byte) 1773 (:lock '%locked-ioblock-read-s8-byte) 1774 (t '%ioblock-read-s8-byte))) 1627 1775 ((= subtag target::subtag-u16-vector) 1628 (case sharing 1629 (:private '%private-ioblock-read-u16-byte) 1630 (:lock '%locked-ioblock-read-u16-byte) 1631 (t '%ioblock-read-u16-byte))) 1776 (setf (ioblock-read-byte-when-locked-function ioblock) 1777 '%ioblock-read-u16-byte) 1778 (case sharing 1779 (:private '%private-ioblock-read-u16-byte) 1780 (:lock '%locked-ioblock-read-u16-byte) 1781 (t '%ioblock-read-u16-byte))) 1632 1782 ((= subtag target::subtag-s16-vector) 1633 (case sharing 1634 (:private '%private-ioblock-read-s16-byte) 1635 (:lock '%locked-ioblock-read-s16-byte) 1636 (t '%ioblock-read-s16-byte))) 1783 (setf (ioblock-read-byte-when-locked-function ioblock) 1784 '%ioblock-read-s16-byte) 1785 (case sharing 1786 (:private '%private-ioblock-read-s16-byte) 1787 (:lock '%locked-ioblock-read-s16-byte) 1788 (t '%ioblock-read-s16-byte))) 1637 1789 ((= subtag target::subtag-u32-vector) 1638 (case sharing 1639 (:private '%private-ioblock-read-u32-byte) 1640 (:lock '%locked-ioblock-read-u32-byte) 1641 (t '%ioblock-read-u32-byte))) 1790 (setf (ioblock-read-byte-when-locked-function ioblock) 1791 '%ioblock-read-u32-byte) 1792 (case sharing 1793 (:private '%private-ioblock-read-u32-byte) 1794 (:lock '%locked-ioblock-read-u32-byte) 1795 (t '%ioblock-read-u32-byte))) 1642 1796 ((= subtag target::subtag-s32-vector) 1643 (case sharing 1644 (:private '%private-ioblock-read-s32-byte) 1645 (:lock '%locked-ioblock-read-s32-byte) 1646 (t '%ioblock-read-s32-byte))) 1797 (setf (ioblock-read-byte-when-locked-function ioblock) 1798 '%ioblock-read-s32-byte) 1799 (case sharing 1800 (:private '%private-ioblock-read-s32-byte) 1801 (:lock '%locked-ioblock-read-s32-byte) 1802 (t '%ioblock-read-s32-byte))) 1647 1803 #+64-bit-target 1648 1804 ((= subtag target::subtag-u64-vector) 1649 (case sharing 1650 (:private '%private-ioblock-read-u64-byte) 1651 (:lock '%locked-ioblock-read-u64-byte) 1652 (t '%ioblock-read-u64-byte))) 1805 (setf (ioblock-read-byte-when-locked-function ioblock) 1806 '%ioblock-read-u64-byte) 1807 (case sharing 1808 (:private '%private-ioblock-read-u64-byte) 1809 (:lock '%locked-ioblock-read-u64-byte) 1810 (t '%ioblock-read-u64-byte))) 1653 1811 #+64-bit-target 1654 1812 ((= subtag target::subtag-s64-vector) 1655 (case sharing 1656 (:private '%private-ioblock-read-s64-byte) 1657 (:lock '%locked-ioblock-read-s64-byte) 1658 (t '%ioblock-read-s64-byte))) 1659 (t '%general-ioblock-read-byte)))))) 1813 (setf (ioblock-read-byte-when-locked-function ioblock) 1814 '%ioblock-read-s64-byte) 1815 (case sharing 1816 (:private '%private-ioblock-read-s64-byte) 1817 (:lock '%locked-ioblock-read-s64-byte) 1818 (t '%ioblock-read-s64-byte))) 1819 ;; Not sure what this means, currently. 1820 (t 1821 (setf (ioblock-read-byte-when-locked-function ioblock) 1822 '%general-ioblock-read-byte) 1823 '%general-ioblock-read-byte)))))) 1660 1824 1661 1825 (defun setup-ioblock-output (ioblock character-p element-type sharing encoding) … … 1668 1832 (ecase unit-size 1669 1833 (8 1834 (setf (ioblock-write-char-when-locked-function ioblock) 1835 '%ioblock-write-u8-encoded-char) 1670 1836 (case sharing 1671 1837 (:private '%private-ioblock-write-u8-encoded-char) … … 1674 1840 (setf (ioblock-write-simple-string-function ioblock) 1675 1841 (ecase unit-size 1676 (8 '%ioblock- u8-encoded-write-simple-string))))1842 (8 '%ioblock-write-u8-encoded-simple-string)))) 1677 1843 (progn 1678 1844 (setf (ioblock-write-simple-string-function ioblock) 1679 1845 '%ioblock-unencoded-write-simple-string) 1846 (setf (ioblock-write-char-when-locked-function ioblock) 1847 '%ioblock-write-char) 1680 1848 (setf (ioblock-write-char-function ioblock) 1681 1849 (case sharing … … 1691 1859 (if character-p 1692 1860 ;; The bivalent case, at least for now 1693 (case sharing 1694 (:private '%bivalent-private-ioblock-write-u8-byte) 1695 (:lock '%bivalent-locked-ioblock-write-u8-byte) 1696 (t '%bivalent-ioblock-write-u8-byte)) 1697 (case sharing 1698 (:private '%private-ioblock-write-u8-byte) 1699 (:lock '%locked-ioblock-write-u8-byte) 1700 (t '%ioblock-write-u8-byte)))) 1861 (progn 1862 (setf (ioblock-write-byte-when-locked-function ioblock) 1863 '%bivalent-ioblock-write-u8-byte) 1864 (case sharing 1865 (:private '%bivalent-private-ioblock-write-u8-byte) 1866 (:lock '%bivalent-locked-ioblock-write-u8-byte) 1867 (t '%bivalent-ioblock-write-u8-byte))) 1868 (progn 1869 (setf (ioblock-write-byte-when-locked-function ioblock) 1870 '%ioblock-write-u8-byte) 1871 (case sharing 1872 (:private '%private-ioblock-write-u8-byte) 1873 (:lock '%locked-ioblock-write-u8-byte) 1874 (t '%ioblock-write-u8-byte))))) 1701 1875 ((= subtag target::subtag-s8-vector) 1876 (setf (ioblock-write-byte-when-locked-function ioblock) 1877 '%ioblock-write-s8-byte) 1702 1878 (case sharing 1703 1879 (:private '%private-ioblock-write-s8-byte) … … 1705 1881 (t '%ioblock-write-s8-byte))) 1706 1882 ((= subtag target::subtag-u16-vector) 1883 (setf (ioblock-write-byte-when-locked-function ioblock) 1884 '%ioblock-write-u16-byte) 1707 1885 (case sharing 1708 1886 (:private '%private-ioblock-write-u16-byte) … … 1710 1888 (t '%ioblock-write-u16-byte))) 1711 1889 ((= subtag target::subtag-s16-vector) 1890 (setf (ioblock-write-byte-when-locked-function ioblock) 1891 '%ioblock-write-s16-byte) 1712 1892 (case sharing 1713 1893 (:private '%private-ioblock-write-s16-byte) … … 1715 1895 (t '%ioblock-write-s16-byte))) 1716 1896 ((= subtag target::subtag-u32-vector) 1897 (setf (ioblock-write-byte-when-locked-function ioblock) 1898 '%ioblock-write-u32-byte) 1717 1899 (case sharing 1718 1900 (:private '%private-ioblock-write-u32-byte) … … 1720 1902 (t '%ioblock-write-u32-byte))) 1721 1903 ((= subtag target::subtag-s32-vector) 1722 (case sharing 1904 (setf (ioblock-write-byte-when-locked-function ioblock) 1905 '%ioblock-write-s32-byte) 1906 (case sharing 1723 1907 (:private '%private-ioblock-write-s32-byte) 1724 1908 (:lock '%locked-ioblock-write-s32-byte) … … 1726 1910 #+64-bit-target 1727 1911 ((= subtag target::subtag-u64-vector) 1728 (case sharing 1912 (setf (ioblock-write-byte-when-locked-function ioblock) 1913 '%ioblock-write-u64-byte) 1914 (case sharing 1729 1915 (:private '%private-ioblock-write-u64-byte) 1730 1916 (:lock '%locked-ioblock-write-u64-byte) … … 1732 1918 #+64-bit-target 1733 1919 ((= subtag target::subtag-s64-vector) 1734 (case sharing 1920 (setf (ioblock-write-byte-when-locked-function ioblock) 1921 '%ioblock-write-u64-byte) 1922 (case sharing 1735 1923 (:private '%private-ioblock-write-s64-byte) 1736 1924 (:lock '%locked-ioblock-write-s64-byte) 1737 1925 (t '%ioblock-write-s64-byte))) 1738 (t '%general-ioblock-write-byte)))))) 1926 (t 1927 (setf (ioblock-write-byte-when-locked-function ioblock) 1928 '%general-ioblock-write-byte) 1929 '%general-ioblock-write-byte)))))) 1739 1930 1740 1931 (defun buffer-element-type-for-character-encoding (encoding)
Note:
See TracChangeset
for help on using the changeset viewer.
