Changeset 5202
- Timestamp:
- Sep 13, 2006, 5:06:24 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (31 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r5192 r5202 373 373 (decode-input-function nil) 374 374 (read-char-no-hang-function nil) 375 (write-simple-string-function nil)376 ( reserved0 nil)377 (re served1 nil)375 (write-simple-string-function 'ioblock-no-char-output) 376 (character-read-vector-function 'ioblock-no-char-input) 377 (read-line-function 'ioblock-no-char-input) 378 378 (reserved2 nil) 379 379 (reserved3 nil)) … … 383 383 ;;; about how streams use them. 384 384 385 (defun ioblock-no-binary-input (ioblock) 385 (defun ioblock-no-binary-input (ioblock &rest otters) 386 (declare (ignore otters)) 386 387 (report-bad-arg (ioblock-stream ioblock) '(and binary-stream input-stream))) 387 388 388 (defun ioblock-no-binary-output (ioblock) 389 (defun ioblock-no-binary-output (ioblock &rest others) 390 (declare (ignore others)) 389 391 (report-bad-arg (ioblock-stream ioblock) '(and binary-stream output-stream))) 390 392 391 (defun ioblock-no-charr-input (ioblock) 393 (defun ioblock-no-charr-input (ioblock &rest others) 394 (declare (ignore others)) 392 395 (report-bad-arg (ioblock-stream ioblock) '(and character-stream input-stream))) 393 396 394 (defun ioblock-no-char-output (ioblock) 397 (defun ioblock-no-char-output (ioblock &rest other-otters) 398 (declare (ignore other-otters)) 395 399 (report-bad-arg (ioblock-stream ioblock) '(and character-stream output-stream))) 396 400 … … 422 426 (or (eq owner *current-process*) 423 427 (error "Stream ~s is private to ~s" (ioblock-stream ioblock) owner))))) 424 425 426 428 427 429 … … 494 496 (aref (the (simple-array (unsigned-byte 8) (*)) 495 497 (io-buffer-buffer buf)) idx))) 498 499 (declaim (inline %ioblock-read-u16-byte)) 500 501 (defun %ioblock-read-u16-byte (ioblock) 502 (declare (optimize (speed 3) (safety 0))) 503 (let* ((buf (ioblock-inbuf ioblock)) 504 (idx (io-buffer-idx buf)) 505 (limit (io-buffer-count buf))) 506 (declare (fixnum idx limit)) 507 (when (= idx limit) 508 (unless (%ioblock-advance ioblock t) 509 (return-from %ioblock-read-u16-byte :eof)) 510 (setq idx (io-buffer-idx buf) 511 limit (io-buffer-count buf))) 512 (setf (io-buffer-idx buf) (the fixnum (1+ idx))) 513 (aref (the (simple-array (unsigned-byte 16) (*)) 514 (io-buffer-buffer buf)) idx))) 515 516 (declaim (inline %ioblock-read-swapped-u16-byte)) 517 (defun %ioblock-read-swapped-u16-byte (ioblock) 518 (declare (optimize (speed 3) (safety 0))) 519 (let* ((buf (ioblock-inbuf ioblock)) 520 (idx (io-buffer-idx buf)) 521 (limit (io-buffer-count buf))) 522 (declare (fixnum idx limit)) 523 (when (= idx limit) 524 (unless (%ioblock-advance ioblock t) 525 (return-from %ioblock-read-swapped-u16-byte :eof)) 526 (setq idx (io-buffer-idx buf) 527 limit (io-buffer-count buf))) 528 (setf (io-buffer-idx buf) (the fixnum (1+ idx))) 529 (let* ((u16 (aref (the (simple-array (unsigned-byte 16) (*)) 530 (io-buffer-buffer buf)) idx))) 531 (declare (type (unsigned-byte 16) u16)) 532 (logand #xffff (the fixnum (logior (the fixnum (ash u16 -8)) 533 (the fixnum (ash u16 8)))))))) 496 534 497 535 … … 635 673 #'%ioblock-read-u8-byte 636 674 ioblock)))))))) 637 675 676 (defun %private-ioblock-read-u8-encoded-char (ioblock) 677 (declare (optimize (speed 3) (safety 0))) 678 (check-ioblock-owner ioblock) 679 (%ioblock-read-u8-encoded-char ioblock)) 680 681 (defun %private-ioblock-read-u8-encoded-char (ioblock) 682 (declare (optimize (speed 3) (safety 0))) 683 (with-ioblock-input-locked (ioblock) 684 (%ioblock-read-u8-encoded-char ioblock))) 685 686 (declaim (inline %ioblock-read-u16-encoded-char)) 687 (defun %ioblock-read-u16-encoded-char (ioblock) 688 (declare (optimize (speed 3) (safety 0))) 689 (let* ((ch (ioblock-untyi-char ioblock))) 690 (if ch 691 (prog1 ch 692 (setf (ioblock-untyi-char ioblock) nil)) 693 (let* ((1st-unit (%ioblock-read-u16-byte ioblock))) 694 (if (eq 1st-unit :eof) 695 1st-unit 696 (locally 697 (declare (type (unsigned-byte 16) 1st-unit)) 698 (if (< 1st-unit 699 (the (mod #x110000) (ioblock-literal-char-code-limit ioblock))) 700 (code-char 1st-unit) 701 (funcall (ioblock-decode-input-function ioblock) 702 1st-unit 703 #'%ioblock-read-u16-byte 704 ioblock)))))))) 705 706 (defun %private-ioblock-read-u16-encoded-char (ioblock) 707 (declare (optimize (speed 3) (safety 0))) 708 (check-ioblock-owner ioblock) 709 (%ioblock-read-u16-encoded-char ioblock)) 710 711 (defun %locked-ioblock-read-u16-encoded-char (ioblock) 712 (declare (optimize (speed 3) (safety 0))) 713 (with-ioblock-input-locked (ioblock) 714 (%ioblock-read-u16-encoded-char ioblock))) 715 638 716 639 717 (declaim (inline %ioblock-tyi-no-hang)) … … 737 815 (%ioblock-force-output ioblock nil)))))))) 738 816 739 (declaim (inline %ioblock-write-simple-string)) 740 741 (defun %ioblock-write-simple-string (ioblock string start-octet num-octets) 817 818 (defun %ioblock-unencoded-write-simple-string (ioblock string start-char num-chars) 742 819 (declare (fixnum start-octet num-octets) (simple-string string)) 743 820 (let* ((written 0) … … 749 826 (type (simple-array (unsigned-byte 8) (*)) buffer) 750 827 (optimize (speed 3) (safety 0))) 751 (do* ((pos start- octet(+ pos written))752 (left num- octets (- left written)))753 ((= left 0) (setf (ioblock-charpos ioblock) col) num- octets)828 (do* ((pos start-char (+ pos written)) 829 (left num-chars (- left written))) 830 ((= left 0) (setf (ioblock-charpos ioblock) col) num-chars) 754 831 (declare (fixnum pos left)) 755 832 (setf (ioblock-dirty ioblock) t) … … 783 860 784 861 862 785 863 (defun %ioblock-eofp (ioblock) 786 864 (let* ((buf (ioblock-inbuf ioblock))) … … 843 921 844 922 923 (declaim (inline %ioblock-write-char)) 845 924 (defun %ioblock-write-char (ioblock char) 846 925 (declare (optimize (speed 3) (safety 0))) … … 854 933 (error "Character ~s can't be encoded on ~s" char (ioblock-stream ioblock))))) 855 934 935 (defun %private-ioblock-write-char (ioblock char) 936 (declare (optimize (speed 3) (safety 0))) 937 (check-ioblock-owner ioblock) 938 (%ioblock-write-char ioblock char)) 939 940 (defun %locked-ioblock-write-char (ioblock char) 941 (declare (optimize (speed 3) (safety 0))) 942 (with-ioblock-input-locked (ioblock) 943 (%ioblock-write-char ioblock char))) 944 945 (declaim (inline %ioblock-write-u8-encoded-char)) 946 (defun %ioblock-write-u8-encoded-char (ioblock char) 947 (declare (optimize (speed 3) (safety 0))) 948 (if (eq char #\linefeed) 949 (setf (ioblock-charpos ioblock) 0) 950 (incf (ioblock-charpos ioblock))) 951 (let* ((code (char-code char))) 952 (declare (type (mod #x110000) code)) 953 (if (< code (the fixnum (ioblock-literal-char-code-limit ioblock))) 954 (%ioblock-write-u8-element ioblock code) 955 (funcall (ioblock-encode-output-function ioblock) 956 char 957 #'%ioblock-write-u8-element 958 ioblock)))) 959 960 (defun %private-ioblock-write-u8-encoded-char (ioblock char) 961 (declare (optimize (speed 3) (safety 0))) 962 (check-ioblock-owner ioblock) 963 (%ioblock-write-u8-encoded-char ioblock char)) 964 965 (defun %locked-ioblock-write-u8-encoded-char (ioblock char) 966 (declare (optimize (speed 3) (safety 0))) 967 (with-ioblock-output-locked (ioblock) 968 (%ioblock-write-u8-encoded-char ioblock char))) 969 970 971 (defun %ioblock-u8-encoded-write-simple-string (ioblock string start-char num-chars) 972 (declare (fixnum start-char num-chars) 973 (simple-base-strng string) 974 (optimize (speed 3) (safety 0))) 975 (do* ((i 0 (1+ i)) 976 (col (ioblock-charpos ioblock)) 977 (limit (ioblock-literal-char-code-limit ioblock)) 978 (encode-function (ioblock-encode-output-function ioblock)) 979 (start-char start-char (1+ start-char))) 980 ((= i num-chars) (setf (ioblock-charpos ioblock) col) num-chars) 981 (declare (fixnum i start-char limit)) 982 (let* ((char (schar string start-char)) 983 (code (char-code char))) 984 (declare (type (mod #x110000) code)) 985 (if (eq char #\newline) 986 (setq col 0) 987 (incf col)) 988 (if (< code limit) 989 (%ioblock-write-u8-element ioblock code) 990 (funcall encode-function char #'%ioblock-write-u8-element ioblock))))) 991 856 992 (defun %ioblock-write-byte (ioblock byte) 857 993 (declare (optimize (speed 3) (safety 0))) … … 864 1000 (io-buffer-idx buf) 0))) 865 1001 866 (defun %ioblock- read-line (ioblock)1002 (defun %ioblock-unencoded-read-line (ioblock) 867 1003 (let* ((string "") 868 1004 (len 0) … … 870 1006 (inbuf (ioblock-inbuf ioblock)) 871 1007 (buf (io-buffer-buffer inbuf)) 872 (newline (if (eq (typecode buf) target::subtag-simple-base-string) 873 #\newline 874 (char-code #\newline)))) 1008 (newline (char-code #\newline))) 875 1009 (let* ((ch (ioblock-untyi-char ioblock))) 876 1010 (when ch 877 1011 (setf (ioblock-untyi-char ioblock) nil) 878 1012 (if (eql ch #\newline) 879 (return-from %ioblock- read-line1013 (return-from %ioblock-unencoded-read-line 880 1014 (values string nil)) 881 1015 (progn … … 884 1018 (setf (schar string 0) ch))))) 885 1019 (loop 886 (let* ((more 0)887 (idx (io-buffer-idx inbuf))888 (count (io-buffer-count inbuf)))889 (declare (fixnum idx count more))890 (if (= idx count)891 (if eof892 (return (values string t))893 (progn894 (setq eof t)895 (%ioblock-advance ioblock t)))896 (progn897 (setq eof nil)898 (let* ((pos (position newline buf :start idx :end count)))899 (when pos900 (locally (declare (fixnum pos))901 (setf (io-buffer-idx inbuf) (the fixnum (1+ pos)))902 (setq more (- pos idx))903 (unless (zerop more)904 (setq string905 (%extend-vector906 0 string (the fixnum (+ len more)))))907 (%copy-u8-to-string908 buf idx string len more)909 (return (values string nil))))910 ;; No #\newline in the buffer. Read everything that's911 ;; there into the string, and fill the buffer again.912 (setf (io-buffer-idx inbuf) count)913 (setq more (- count idx)914 string (%extend-vector915 0 string (the fixnum (+ len more))))916 (%copy-u8-to-string917 buf idx string len more)918 (incf len more))))))))1020 (let* ((more 0) 1021 (idx (io-buffer-idx inbuf)) 1022 (count (io-buffer-count inbuf))) 1023 (declare (fixnum idx count more)) 1024 (if (= idx count) 1025 (if eof 1026 (return (values string t)) 1027 (progn 1028 (setq eof t) 1029 (%ioblock-advance ioblock t))) 1030 (progn 1031 (setq eof nil) 1032 (let* ((pos (position newline buf :start idx :end count))) 1033 (when pos 1034 (locally (declare (fixnum pos)) 1035 (setf (io-buffer-idx inbuf) (the fixnum (1+ pos))) 1036 (setq more (- pos idx)) 1037 (unless (zerop more) 1038 (setq string 1039 (%extend-vector 1040 0 string (the fixnum (+ len more))))) 1041 (%copy-u8-to-string 1042 buf idx string len more) 1043 (return (values string nil)))) 1044 ;; No #\newline in the buffer. Read everything that's 1045 ;; there into the string, and fill the buffer again. 1046 (setf (io-buffer-idx inbuf) count) 1047 (setq more (- count idx) 1048 string (%extend-vector 1049 0 string (the fixnum (+ len more)))) 1050 (%copy-u8-to-string 1051 buf idx string len more) 1052 (incf len more)))))))) 919 1053 920 (defun %ioblock- character-read-vector (ioblock vector start end)1054 (defun %ioblock-unencoded-character-read-vector (ioblock vector start end) 921 1055 (do* ((i start) 922 1056 (in (ioblock-inbuf ioblock)) … … 1012 1146 (if (> avail need) 1013 1147 (setq avail need)) 1014 (%copy-ivector-to-ivectorinbuf idx vector i avail)1148 (%copy-u8-to-string inbuf idx vector i avail) 1015 1149 (setf (io-buffer-idx in) (+ idx avail)) 1016 1150 (incf i avail) … … 1078 1212 1079 1213 1080 (defun setup-ioblock-input (ioblock character-p element-type sharing )1214 (defun setup-ioblock-input (ioblock character-p element-type sharing encoding) 1081 1215 (when character-p 1082 (setf (ioblock-read-char-function ioblock) 1083 (case sharing 1084 (:private '%private-ioblock-tyi) 1085 (:lock '%locked-ioblock-tyi) 1086 (t '%ioblock-tyi)))) 1216 (if encoding 1217 (let* ((unit-size (character-encoding-code-unit-size encoding))) 1218 (setf (ioblock-decode-input-function ioblock) 1219 (character-encoding-stream-decode-function encoding)) 1220 (setf (ioblock-read-char-function ioblock) 1221 (ecase unit-size 1222 (8 1223 (case sharing 1224 (:private '%private-ioblock-read-u8-encoded-char) 1225 (:lock '%locked-ioblock-read-u8-encoded-char) 1226 (t '%ioblock-read-u8-encoded-char)))))) 1227 (progn 1228 (setf (ioblock-read-char-function ioblock) 1229 (case sharing 1230 (:private '%private-ioblock-tyi) 1231 (:lock '%locked-ioblock-tyi) 1232 (t '%ioblock-tyi))) 1233 (setf (ioblock-character-read-vector-function ioblock) 1234 '%ioblock-unencoded-character-read-vector) 1235 (setf (ioblock-read-line-function ioblock) 1236 '%ioblock-unencoded-read-line)))) 1087 1237 (unless (or (eq element-type 'character) 1088 1238 (subtypep element-type 'character)) … … 1101 1251 (:lock '%locked-ioblock-read-u8-byte) 1102 1252 (t '%ioblock-read-u8-byte)))) 1103 (t '%general-ioblock-read-byte)))))) 1253 (t '%general-ioblock-read-byte)))))) 1254 1255 (defun setup-ioblock-output (ioblock character-p element-type sharing encoding) 1256 (when character-p 1257 (if encoding 1258 (let* ((unit-size (character-encoding-code-unit-size encoding))) 1259 (setf (ioblock-encode-output-function ioblock) 1260 (character-encoding-stream-encode-function encoding)) 1261 (setf (ioblock-write-char-function ioblock) 1262 (ecase unit-size 1263 (8 1264 (case sharing 1265 (:private '%private-ioblock-write-u8-encoded-char) 1266 (:lock '%locked-ioblock-write-u8-encoded-charchar) 1267 (t '%ioblock-write-u8-encoded-char))))) 1268 (setf (ioblock-write-simple-string-function ioblock) 1269 (ecase unit-size 1270 (8 '%ioblock-u8-encoded-write-simple-string)))) 1271 (progn 1272 (setf (ioblock-write-simple-string-function ioblock) 1273 '%ioblock-unencoded-write-simple-string) 1274 (setf (ioblock-write-char-function ioblock) 1275 (case sharing 1276 (:private '%private-ioblock-write-char) 1277 (:lock '%locked-ioblock-write-char) 1278 (t '%ioblock-write-char))))))) 1279 1280 (defun buffer-element-type-for-character-encoding (encoding) 1281 (if encoding 1282 (ecase (character-encoding-code-unit-size encoding) 1283 (8 '(unsigned-byte 8)) 1284 (16 '(unsigned-byte 16)) 1285 (32 '(unsigned-byte 32))) 1286 '(unsigned-byte 8))) 1104 1287 1105 1288 (defun init-stream-ioblock (stream … … 1122 1305 (sharing :private) 1123 1306 character-p 1307 encoding 1124 1308 &allow-other-keys) 1125 1309 (declare (ignorable element-shift)) 1310 (when encoding 1311 (unless (typep encoding 'character-encoding) 1312 (setq encoding (get-character-encoding encoding))) 1313 (if (eq encoding (get-character-encoding nil)) 1314 (setq encoding nil))) 1126 1315 (when sharing 1127 1316 (unless (or (eq sharing :private) … … 1137 1326 (when (eq sharing :private) 1138 1327 (setf (ioblock-owner ioblock) *current-process*)) 1328 (setf (ioblock-encoding ioblock) encoding) 1329 (setf (ioblock-literal-char-code-limit ioblock) 1330 (if encoding 1331 (character-encoding-literal-char-code-limit encoding) 1332 256)) 1139 1333 (when insize 1140 1334 (unless (ioblock-inbuf ioblock) 1141 1335 (multiple-value-bind (buffer ptr in-size-in-octets) 1142 (make-heap-ivector insize (if character-p '(unsigned-byte 8) element-type)) 1336 (make-heap-ivector insize 1337 (if character-p 1338 (buffer-element-type-for-character-encoding encoding) 1339 element-type)) 1143 1340 (setf (ioblock-inbuf ioblock) 1144 1341 (make-io-buffer :buffer buffer … … 1148 1345 (when (eq sharing :lock) 1149 1346 (setf (ioblock-inbuf-lock ioblock) (make-lock))) 1150 (setup-ioblock-input ioblock character-p element-type sharing )1347 (setup-ioblock-input ioblock character-p element-type sharing encoding) 1151 1348 (setf (ioblock-element-shift ioblock) (max 0 (ceiling (log (/ in-size-in-octets insize) 2)))) 1152 1349 ))) … … 1161 1358 (unless (ioblock-outbuf ioblock) 1162 1359 (multiple-value-bind (buffer ptr out-size-in-octets) 1163 (make-heap-ivector outsize (if character-p '(unsigned-byte 8) element-type)) 1360 (make-heap-ivector outsize 1361 (if character-p 1362 (buffer-element-type-for-character-encoding encoding) 1363 element-type)) 1164 1364 (setf (ioblock-outbuf ioblock) 1165 1365 (make-io-buffer :buffer buffer … … 1172 1372 (setf (ioblock-element-shift ioblock) (max 0 (ceiling (log (/ out-size-in-octets outsize) 2)))) 1173 1373 )))) 1374 (when (or share-buffers-p outsize) 1375 (setup-ioblock-output ioblock character-p element-type sharing encoding)) 1174 1376 (when element-type 1175 1377 (setf (ioblock-element-type ioblock) element-type)) … … 1235 1437 (character-p (or (eq element-type 'character) 1236 1438 (subtypep element-type 'character))) 1237 (basic nil)) 1439 (basic nil) 1440 encoding) 1238 1441 (when basic 1239 1442 (setq class (map-to-basic-stream-class-name class)) … … 1260 1463 :close-function 'fd-stream-close 1261 1464 :sharing sharing 1262 :character-p character-p))) 1465 :character-p character-p 1466 :encoding encoding))) 1263 1467 1264 1468 ;;; Fundamental streams. … … 1625 1829 (let* ((ioblock (basic-stream-ioblock stream))) 1626 1830 (with-ioblock-input-locked (ioblock) 1627 (%ioblock-character-read-vector ioblock vector start end))))) 1831 (funcall (ioblock-character-read-vector-function ioblock) 1832 ioblock vector start end))))) 1628 1833 1629 1834 (defmethod stream-read-line ((stream basic-character-input-stream)) 1630 1835 (let* ((ioblock (basic-stream-ioblock stream))) 1631 1836 (with-ioblock-input-locked (ioblock) 1632 ( %ioblock-read-lineioblock))))1837 (funcall (ioblock-read-line-function ioblock) ioblock)))) 1633 1838 1634 1839 … … 2462 2667 2463 2668 (defmethod stream-write-char ((stream buffered-character-output-stream-mixin) char) 2464 ( with-stream-ioblock-output (ioblock stream :speedy t)2465 ( %ioblock-write-charioblock char)))2669 (let* ((ioblock (stream-ioblock stream t))) 2670 (funcall (ioblock-write-char-function ioblock) ioblock char))) 2466 2671 2467 2672 (defmethod stream-write-char ((stream basic-character-output-stream) char) 2468 2673 (let* ((ioblock (basic-stream-ioblock stream))) 2469 (with-ioblock-output-locked (ioblock) 2470 (%ioblock-write-char ioblock char)))) 2674 (funcall (ioblock-write-char-function ioblock) ioblock char))) 2471 2675 2472 2676 … … 2535 2739 nil))) 2536 2740 2537 (defun %ioblock-write-general-string (ioblock string start end) 2538 (setq end (check-sequence-bounds string start end)) 2539 (locally (declare (fixnum start end)) 2540 (multiple-value-bind (arr offset) 2541 (if (typep string 'simple-string) 2542 (values string 0) 2543 (array-data-and-offset (require-type string 'string))) 2544 (unless (eql 0 offset) 2545 (incf start offset) 2546 (incf end offset)) 2547 (%ioblock-write-simple-string ioblock arr start (the fixnum (- end start)))))) 2741 2548 2742 2549 2743 (defmethod stream-write-string ((stream buffered-character-output-stream-mixin) … … 2553 2747 (if (and (typep string 'simple-string) 2554 2748 (not start-p)) 2555 (%ioblock-write-simple-string ioblock string 0 (length string)) 2556 (%ioblock-write-general-string ioblock string start end)))) 2749 (funcall (ioblock-write-simple-string-function ioblock) 2750 ioblock string 0 (length string)) 2751 (progn 2752 (setq end (check-sequence-bounds string start end)) 2753 (locally (declare (fixnum start end)) 2754 (multiple-value-bind (arr offset) 2755 (if (typep string 'simple-string) 2756 (values string 0) 2757 (array-data-and-offset (require-type string 'string))) 2758 (unless (eql 0 offset) 2759 (incf start offset) 2760 (incf end offset)) 2761 (funcall (ioblock-write-simple-string-function ioblock) 2762 ioblock arr start (the fixnum (- end start)))))))) 2763 string) 2557 2764 2558 2765 (defmethod stream-write-string ((stream basic-character-output-stream) … … 2561 2768 (let* ((ioblock (basic-stream-ioblock stream))) 2562 2769 (with-ioblock-output-locked (ioblock) 2563 (if (and (typep string 'simple-string) 2564 (not start-p)) 2565 (%ioblock-write-simple-string ioblock string 0 (length string)) 2566 (%ioblock-write-general-string ioblock string start end))))) 2770 (if (and (typep string 'simple-string) 2771 (not start-p)) 2772 (funcall (ioblock-write-simple-string-function ioblock) 2773 ioblock string 0 (length string)) 2774 (progn 2775 (setq end (check-sequence-bounds string start end)) 2776 (locally (declare (fixnum start end)) 2777 (multiple-value-bind (arr offset) 2778 (if (typep string 'simple-string) 2779 (values string 0) 2780 (array-data-and-offset (require-type string 'string))) 2781 (unless (eql 0 offset) 2782 (incf start offset) 2783 (incf end offset)) 2784 (funcall (ioblock-write-simple-string-function ioblock) 2785 ioblock arr start (the fixnum (- end start))))))))) 2786 string) 2567 2787 2568 2788 … … 2702 2922 (%ioblock-force-output ioblock nil))))))))))) 2703 2923 2704 (defmethod stream-read-vector ((stream basic-character-input-stream) 2705 vector start end) 2706 (declare (fixnum start end)) 2707 (if (not (typep vector 'simple-base-string)) 2708 (call-next-method) 2709 (let* ((ioblock (basic-stream-ioblock stream))) 2710 (with-ioblock-input-locked (ioblock) 2711 (%ioblock-character-read-vector ioblock vector start end))))) 2924 2712 2925 2713 2926 (defmethod stream-read-vector ((stream basic-binary-input-stream) … … 2726 2939 (call-next-method) 2727 2940 (with-stream-ioblock-input (ioblock stream :speedy t) 2728 (%ioblock-character-read-vector ioblock vector start end)))) 2941 (funcall (ioblock-character-read-vector-function ioblock) 2942 ioblock vector start end)))) 2729 2943 2730 2944 … … 2988 3202 (defmethod stream-read-line ((s buffered-stream-mixin)) 2989 3203 (with-stream-ioblock-input (ioblock s :speedy t) 2990 ( %ioblock-read-lineioblock)))3204 (funcall (ioblock-read-line-function ioblock) ioblock))) 2991 3205 2992 3206 (defmethod stream-clear-input ((s fd-input-stream))
Note:
See TracChangeset
for help on using the changeset viewer.
