#1. (SETF LOGBITP) is not defined in ACL 8.1 (nor in CLISP), and as far as I can tell isn't part of the standard nor can be portably defined.
I'm changing (SETF (LOGBITP x y) z) to (SETF y (DPB z (BYTE 1 x) y) (2 places). Maybe (SETF LDB) is better?
#2. It seems that cl-serializer assumes that objects of type BASE-CHAR must be 8-bit characters, and thus can be encoded in a single byte. But this isn't the case in Allegro, where (TYPEP (CODE-CHAR 257) 'BASE-CHAR) is true. I didn't find a good way to get into the type detection logic to cause multi-byte characters to do the right thing. Suggestions?
Andrew
#1. (SETF LOGBITP) is not defined in ACL 8.1 (nor in CLISP), and as far as I can tell isn't part of the standard nor can be portably defined.
I'm changing (SETF (LOGBITP x y) z) to (SETF y (DPB z (BYTE 1 x) y) (2 places). Maybe (SETF LDB) is better?
Levy is in the middle of a big refactor/cleanup of all our projects, so i don't want to commit this before syncing up:
(defmacro bit-value (index integer) `(logbitp index integer))
(define-setf-expander bit-value (index integer &environment env) (multiple-value-bind (temps vals stores store-form access-form) (get-setf-expansion integer env) (with-unique-names (ind store) (bind ((stemp (first stores))) (values `(,ind ,@temps) `(,index ,@vals) (list store) `(let ((,stemp (dpb (if ,store 1 0) (byte 1 ,ind) ,access-form))) ,store-form ,store) `(logbitp ,ind ,access-form))))))
#2. It seems that cl-serializer assumes that objects of type BASE-CHAR must be 8-bit characters, and thus can be encoded in a single byte. But this isn't the case in Allegro, where (TYPEP (CODE-CHAR 257) 'BASE-CHAR) is true. I didn't find a good way to get into the type detection logic to cause multi-byte characters to do the right thing. Suggestions?
my first take on this is that on platforms where there's no difference between character and base-char, there's no point in fooling around with simple-base-string's, which are optimizations anyway. so, some #+ magic could get rid of this optimization where it is pointless anyway...
hi!
sorry for the delay, cleaning up my starred mails... :)
#1. (SETF LOGBITP) is not defined in ACL 8.1 (nor in CLISP), and as far as I can tell isn't part of the standard nor can be portably defined.
I'm changing (SETF (LOGBITP x y) z) to (SETF y (DPB z (BYTE 1 x) y) (2 places). Maybe (SETF LDB) is better?
#2. It seems that cl-serializer assumes that objects of type BASE-CHAR must be 8-bit characters, and thus can be encoded in a single byte. But this isn't the case in Allegro, where (TYPEP (CODE-CHAR 257) 'BASE-CHAR) is true. I didn't find a good way to get into the type detection logic to cause multi-byte characters to do the right thing. Suggestions?
for the record, both of these issues should be dealt with in hu.dwim.serializer.
http://dwim.hu/darcsweb/darcsweb.cgi?r=HEAD%20hu.dwim.serializer;a=summary
cl-serializer-devel@common-lisp.net