[babel-devel] string-to-octets optimization for base-string's
Luis, please take a look at the attached patch as time permits. it optimizes string-to-octets when called with simple-base-string's but unfortunately it compiles with warnings which stops asdf:load-op... the problem is with calling instantiate-concrete-mappings with simple-base-string. do you have any ideas how to handle this? i have this patch hanging around locally for quite some time now... -- attila
2008/9/7 Attila Lendvai <attila.lendvai@gmail.com>:
the problem is with calling instantiate-concrete-mappings with simple-base-string.
And they say Lisp has no static typing! :-) Actually it only complains for UTF-8B. It should probably signal an error for every other non-ascii (or non latin-1?) encoding, I think. The problem is that you're defining simple-base-string octet decoders which will try to fit unicode characters into simple-base-strings. SBCL caught this for the UTF-8B decoder, but it's probably an issue for other encodings as well. More importantly, this is an issue for Allegro, Lispworks, etc, because they have 16-bit chars and I don't think babel is dealing with this properly. Oh, and I really need to make Babel more debuggable... *sigh*
do you have any ideas how to handle this? i have this patch hanging around locally for quite some time now...
I suggest adding a simple option to instantiate-concrete-mappings to make it not generate the code-point-counters and decoders, which you don't need. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
participants (2)
-
Attila Lendvai
-
Luís Oliveira