43 |
(proclaim '(optimize (safety 2) (space 3))) |
(proclaim '(optimize (safety 2) (space 3))) |
44 |
|
|
45 |
(defun best-array-element-type (type) |
(defun best-array-element-type (type) |
46 |
(cond ((or (eql t type) (null type)) |
(cond ((null type) nil) |
47 |
t) |
((eql t type) t) |
48 |
((memq type '(bit unsigned-char signed-char |
((memq type '(bit unsigned-char signed-char |
49 |
unsigned-short |
unsigned-short |
50 |
signed-short fixnum)) |
signed-short fixnum)) |
51 |
type) |
type) |
52 |
((subtypep type 'fixnum) |
((subtypep type 'fixnum) |
53 |
(dolist (v '(bit unsigned-char signed-char |
(dolist (v '(bit positive-char signed-char unsigned-char positive-short signed-short unsigned-short) |
|
unsigned-short |
|
|
signed-short) |
|
54 |
'fixnum) |
'fixnum) |
55 |
(cond ((subtypep type v) |
(cond ((subtypep type v) |
56 |
(return v))))) |
(return v))))) |