Add work-around bit-stream-read-bits for ecl bug in (unsigned-byte 8) negation.

The compiler in ecl version 10.7.1 generates erroneous code for the negation
of bits in bit-stream-read-bits if bits is declared as an (unsigned-byte 8).
Hence we declare bits as a (signed-byte 8) for ecl, given that ecl does not
generate optimal code in either case, but correct code for the later case.
This commit is contained in:
2010-10-08 20:14:37 +02:00
parent b18f8fa1da
commit 929d3f9bc9

View File

@ -287,7 +287,8 @@
(declaim (inline bit-stream-read-bits)) (declaim (inline bit-stream-read-bits))
(defun bit-stream-read-bits (stream bits) (defun bit-stream-read-bits (stream bits)
(declare (type bit-stream stream) (type (unsigned-byte 8) bits)) (declare (type bit-stream stream) (type #-ecl (unsigned-byte 8)
#+ecl (signed-byte 8) bits))
"Read single or multiple bits from the given bit-stream." "Read single or multiple bits from the given bit-stream."
(loop while (< (bit-stream-bit-count stream) bits) (loop while (< (bit-stream-bit-count stream) bits)
do do