mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2025-12-06 02:40:26 -08:00
cmp: fix compiler-macro for make-array
Constant arguments for the dimensions were not handled correctly. The valid-array-index function was lost in a refactor some time ago. Moreover, we need to check all of the conditions on the dimensions (limits on rank, dimension and total size) using an AND statement instead of checking only the first condition using OR.
This commit is contained in:
parent
31bcb06d83
commit
270b3a4157
1 changed files with 4 additions and 3 deletions
|
|
@ -34,9 +34,10 @@
|
|||
(list dimensions))
|
||||
((and (listp dimensions)
|
||||
(let ((rank (list-length dimensions)))
|
||||
(or (numberp rank)
|
||||
(< -1 rank array-rank-limit)
|
||||
(every #'valid-array-index dimensions))))
|
||||
(and (numberp rank)
|
||||
(< -1 rank array-rank-limit)
|
||||
(every #'(lambda (x) (typep x 'ext:array-index)) dimensions)
|
||||
(< (apply '* dimensions) array-total-size-limit))))
|
||||
dimensions)
|
||||
(t
|
||||
(cmpwarn "The first argument to MAKE-ARRAY~%~A~%is not a valid set of dimensions" orig-dimensions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue