1.0.31.23: OAOOize external-format support
authorNathan Froyd <froydnj@cs.rice.edu>
Tue, 29 Sep 2009 01:02:20 +0000 (01:02 +0000)
committerNathan Froyd <froydnj@cs.rice.edu>
Tue, 29 Sep 2009 01:02:20 +0000 (01:02 +0000)
commitf2db6743b1fadeea9e72cb583d857851c87efcd4
treefdd220e2363e4500aef55ef115a30c005f219e83
parent7be799a096f8be64365dfd5b566f667f9ea0314a
1.0.31.23: OAOOize external-format support

fd-streams and octets support independently kept records of
external-format->function maps, suitable for the purposes of each.  This
revision stores all the relevant information for an external format in a
single place--a new EXTERNAL-FORMAT structure--and has both clients
reference things in that single place.

Doing so offers opportunities for other cleanups and speedups.
fd-streams external-format storage was an alist of lists, which was bad
for client code, since everything referred to fields with NTH or
SECOND/FOURTH/FIFTH.  A proper DEFSTRUCT helps here and should be
slightly more space-efficient, as we're replacing a list with
(effectively) a vector.  Also, since clients had to scan through an
alist to find an external-format, this design was hurting performance in
streams code, most notably OPEN.  Replacing the alist with a hash table
(which the octets code was already using) should make things a lot
snappier.
15 files changed:
build-order.lisp-expr
src/code/external-formats/enc-basic.lisp [new file with mode: 0644]
src/code/external-formats/enc-cyr.lisp
src/code/external-formats/enc-dos.lisp
src/code/external-formats/enc-ebcdic.lisp
src/code/external-formats/enc-iso.lisp
src/code/external-formats/enc-win.lisp
src/code/external-formats/mb-util.lisp
src/code/external-formats/ucs-2.lisp
src/code/fd-stream.lisp
src/code/host-c-call.lisp
src/code/octets.lisp
src/code/target-c-call.lisp
tests/external-format.impure.lisp
version.lisp-expr