Merge pull request #937 from gambiteer/231-checks

SRFI 231: Declare char-storage-class, fix interval-projections
This commit is contained in:
Alex Shinn 2023-08-29 20:54:13 +09:00 committed by GitHub
commit f9908f19ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -33,6 +33,7 @@
u64-storage-class f8-storage-class f16-storage-class
f32-storage-class f64-storage-class
c64-storage-class c128-storage-class
char-storage-class
storage-class-data? storage-class-data->body
;; Arrays
make-array array? array-domain array-getter array-dimension

View file

@ -117,10 +117,12 @@
(vector-every < i (interval-ub iv)))))
(define (interval-projections iv rd)
(values (make-interval (vector-copy (interval-lb iv) 0 rd)
(vector-copy (interval-ub iv) 0 rd))
(make-interval (vector-copy (interval-lb iv) rd)
(vector-copy (interval-ub iv) rd))))
(assert (interval? iv))
(let ((n (vector-length (interval-lb iv))))
(values (make-interval (vector-copy (interval-lb iv) 0 (- n rd))
(vector-copy (interval-ub iv) 0 (- n rd)))
(make-interval (vector-copy (interval-lb iv) (- n rd))
(vector-copy (interval-ub iv) (- n rd))))))
(define (rev-index-next! rev-index rev-lowers rev-uppers)
(cond