File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1736,6 +1736,27 @@ public static final LispObject getUpgradedArrayElementType(LispObject type)
17361736 }
17371737 }
17381738 }
1739+ else if (car .equals (Symbol .UNSIGNED_BYTE ))
1740+ {
1741+ LispObject bits = type .cadr ();
1742+ if (!(bits instanceof Fixnum )) {
1743+ simple_error ("bad size specified for UNSIGNED-BYTE type specifier: ~a" , bits );
1744+ }
1745+ int b = ((Fixnum )bits ).value ;
1746+ if (0 == b ) {
1747+ simple_error ("bad size specified for UNSIGNED-BYTE type specifier: ~a" , bits );
1748+ } else if (1 == b ) {
1749+ return Symbol .BIT ;
1750+ } else if (1 <= b && b <= 8 ) {
1751+ return UNSIGNED_BYTE_8 ;
1752+ } else if (9 <= b && b <= 16 ) {
1753+ return UNSIGNED_BYTE_16 ;
1754+ } else if (17 <= b && b <= 32 ) {
1755+ return UNSIGNED_BYTE_32 ;
1756+ } else {
1757+ return T ;
1758+ }
1759+ }
17391760 else if (car == Symbol .EQL )
17401761 {
17411762 LispObject obj = type .cadr ();
You can’t perform that action at this time.
0 commit comments