Re: array type upgrading bug in 0.12.1

John Wiseman <[email protected]> Thu, 18 Jul 2002 23:53:58 -0700
Newsgroups gmane.lisp.openmcl.bugs
Message-ID <[email protected]>
John Wiseman wrote:
> ? (upgraded-array-element-type '(signed-byte 16))
> (SIGNED-BYTE 8)
> 
> 
> Also, and it's a little hairy to figure out exactly what code caused it, but
> it's in CLX's make-char-info function and it might be related to the above,
> I got an error message that seems suspicious:
> 
> "Error: value 600 is not of the expected type (SIGNED-BYTE 16)."

The following patch fixed both problems.


John Wiseman


--- l0-array.lisp       Wed May 15 00:58:38 2002
+++ l0-array-patched.lisp       Thu Jul 18 23:52:42 2002
@@ -525,7 +525,7 @@
                   ((and (>= low 0) (<= high 65535)) arch::subtag-u16-vector)
                   ((and (>= low 0) (<= high #xffffffff) arch::subtag-u32-vector))
                   ((and (>= low -128) (<= high 127)) arch::subtag-s8-vector)
-                 ((and (>= low -32768) (<= high 32767) arch::subtag-s8-vector))
+                 ((and (>= low -32768) (<= high 32767) arch::subtag-s16-vector))
                   ((and (>= low (ash -1 31)) (<= high (1- (ash 1 31))))
                    arch::subtag-s32-vector)
                   (t arch::subtag-simple-vector))))