- (typecase (constant-value leaf)
- ((or number character) t)
- (symbol (symbol-package (constant-value leaf)))
- (t nil))))
+ ;; Specialized arrays are legal, too. KLUDGE: this would be
+ ;; *much* cleaner if SIMPLE-UNBOXED-ARRAY was defined on the host.
+ #.(loop for saetp across sb!vm:*specialized-array-element-type-properties*
+ unless (eq t (sb!vm:saetp-specifier saetp))
+ collect `((simple-array ,(sb!vm:saetp-specifier saetp) (*)) t) into cases
+ finally (return
+ `(typecase (constant-value leaf)
+ ((or number character) t)
+ (symbol (symbol-package (constant-value leaf)))
+ ,@cases
+ (t nil))))))