Merge changes from unicode-string-buffer-impl-branch which gives
faster reads on external-formats. This is done by adding an additional buffer to streams so we can convert the entire in-buffer into characters all at once. To build this change, you need to do a cross-compile using boot-2009-10-1-cross.lisp. Using that build, do a normal build with these sources. For a non-unicode build use boot-2009-10-01.lisp with a 20a non-unicode build. code/extfmts.lisp: o Add another slot to the extfmts for copying the state. o Modify EF-OCTETS-TO-STRING and OCTETS-TO-STRING to support the necesssary changes for fast formats. This is incompatible with the previous version because the string is not grown if needed. code/fd-stream-extfmt.lisp: o Set *enable-stream-buffer-p* to T so we have fast streams. code/fd-stream.lisp: o Add new slots to support fast strams. o In SET-ROUTINES, initialize the new slots appropriately. o Update UNREAD-CHAR to be able to back up in the string buffer to unread. o Add implementation to copy the state of an external format. code/stream.lisp: o Change %SET-FD-STREAM-EXTERNAL-FORMAT to be able to change formats even if we've already converted the buffer with a different format. We reconvert the buffer with the old format until we reach the current character. Then the remaining octets are converted using the new format and stored in the string buffer. o Add FAST-READ-CHAR-STRING-REFILL to refill the string buffer, like FAST-READ-CHAR-REFILL does for the octet in-buffer. code/struct.lisp: o Add new slots to hold the string buffer, the current index, and length. These are needed for the fast formats. code/sysmacs.lisp: o Update PREPARE-FOR-FAST-READ-CHAR, DONE-WITH-FAST-READ-CHAR, and FAST-READ-CHAR to support the string buffer. code/string.lisp: o Microoptimization of SURROGATEP to reduce the number of branchs. general-info/release-20b.txt: o Update with these changes pcl/simple-streams/external-formats/utf-16-be.lisp: pcl/simple-streams/external-formats/utf-16-le.lisp: pcl/simple-streams/external-formats/utf-16.lisp: o These formats actually have state, so update them to take a handle an initial state. These are needed if the string buffer ends with a leading surrogate and the next string buffer starts with a trailing surrogate. The conversion needs to combine the surrogates together.
Showing
- bootfiles/20a/boot-2009-10-01.lisp 22 additions, 0 deletionsbootfiles/20a/boot-2009-10-01.lisp
- bootfiles/20a/boot-2009-10-1-cross.lisp 8 additions, 0 deletionsbootfiles/20a/boot-2009-10-1-cross.lisp
- code/extfmts.lisp 52 additions, 38 deletionscode/extfmts.lisp
- code/fd-stream-extfmt.lisp 4 additions, 1 deletioncode/fd-stream-extfmt.lisp
- code/fd-stream.lisp 55 additions, 15 deletionscode/fd-stream.lisp
- code/stream.lisp 143 additions, 13 deletionscode/stream.lisp
- code/string.lisp 7 additions, 7 deletionscode/string.lisp
- code/struct.lisp 17 additions, 2 deletionscode/struct.lisp
- code/sysmacs.lisp 37 additions, 13 deletionscode/sysmacs.lisp
- general-info/release-20b.txt 8 additions, 1 deletiongeneral-info/release-20b.txt
- pcl/simple-streams/external-formats/utf-16-be.lisp 22 additions, 4 deletionspcl/simple-streams/external-formats/utf-16-be.lisp
- pcl/simple-streams/external-formats/utf-16-le.lisp 25 additions, 5 deletionspcl/simple-streams/external-formats/utf-16-le.lisp
- pcl/simple-streams/external-formats/utf-16.lisp 26 additions, 12 deletionspcl/simple-streams/external-formats/utf-16.lisp
- pcl/simple-streams/external-formats/utf-32.lisp 2 additions, 2 deletionspcl/simple-streams/external-formats/utf-32.lisp
Loading
Please register or sign in to comment