diff options
author | Camm Maguire <camm@debian.org> | 2014-06-02 22:20:57 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014-06-02 22:20:57 +0000 |
commit | b86d87294563832e3a5c4a174f3e04e44e629d3f (patch) | |
tree | 0e71b443f8936699de9794f3a2c2f29da12eb0e7 | |
parent | 29674ac385f660cd2dc85717c5c9f27184282727 (diff) | |
download | gcl-b86d87294563832e3a5c4a174f3e04e44e629d3f.tar.gz |
array-dimension-limit is exclusive uppoer bound for seqind
-rwxr-xr-x | gcl/lsp/gcl_predlib.lsp | 4 | ||||
-rw-r--r-- | gcl/o/array.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcl/lsp/gcl_predlib.lsp b/gcl/lsp/gcl_predlib.lsp index 84f6f3cc..598a25ec 100755 --- a/gcl/lsp/gcl_predlib.lsp +++ b/gcl/lsp/gcl_predlib.lsp @@ -299,7 +299,7 @@ (defun equal-is-eq (x) (typep x (funcall (get 'equal-is-eq-tp 'deftype-definition)))) (defun equalp-is-eq (x) (typep x (funcall (get 'equalp-is-eq-tp 'deftype-definition)))) -(defun seqindp (x) (and (fixnump x) (>= x 0) (<= x array-dimension-limit))) +(defun seqindp (x) (and (fixnump x) (>= x 0) (< x array-dimension-limit))) (si::putprop 'seqindp t 'compiler::cmp-inline) (deftype non-negative-char () `(non-negative-byte ,char-length)) @@ -1621,7 +1621,7 @@ (rt (if (or (not (cadr rt)) (car mt)) rt `(nil nil)))) (values (not (car rt)) (not (cadr rt)))))) -(deftype seqind (&aux (s array-dimension-limit)) `(,(if (<= s most-positive-immfix) 'immfix 'fixnum) 0 ,s)) +(deftype seqind (&aux (s (1- array-dimension-limit))) `(,(if (<= s most-positive-immfix) 'immfix 'fixnum) 0 ,s)) (deftype rnkind (&aux (s array-rank-limit)) `(,(if (<= s most-positive-immfix) 'immfix 'fixnum) 0 ,s)) (deftype mod (n) `(,(cond ((<= (1- n) most-positive-immfix) 'immfix)((<= (1- n) most-positive-fixnum) 'fixnum)('integer)) 0 ,(1- n))) diff --git a/gcl/o/array.c b/gcl/o/array.c index b983815d..ab6f19b2 100644 --- a/gcl/o/array.c +++ b/gcl/o/array.c @@ -62,8 +62,8 @@ Iarray_element_type(object); DEFCONST("ARRAY-RANK-LIMIT", sLarray_rank_limit, LISP, make_fixnum(ARRAY_RANK_LIMIT),""); -DEFCONST("ARRAY-DIMENSION-LIMIT", sLarray_dimension_limit,LISP,make_fixnum(((1UL<<31)>>3)-1),""); -DEFCONST("ARRAY-TOTAL-SIZE-LIMIT", sLarray_total_size_limit,LISP,make_fixnum(((1UL<<31)>>3)-1),""); +DEFCONST("ARRAY-DIMENSION-LIMIT", sLarray_dimension_limit,LISP,make_fixnum(((1UL<<31)>>3)),""); +DEFCONST("ARRAY-TOTAL-SIZE-LIMIT", sLarray_total_size_limit,LISP,make_fixnum(((1UL<<31)>>3)),""); DEF_ORDINARY("BIT",sLbit,LISP,""); |