mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 02:00:26 +02:00
Replace bit-count with bitvector-count
The old name was wonky and had bad argument order. * NEWS: Add entry. * doc/ref/api-data.texi (Bit Vectors): Update. * libguile/bitvectors.h: * libguile/bitvectors.c (VALIDATE_BITVECTOR): New helper. (scm_bitvector_count): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_count): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-count with bitvector-count. * module/srfi/srfi-60.scm: No need to #:replace bit-count. * module/system/vm/frame.scm (available-bindings): Use bitvector-count. * test-suite/tests/bitvectors.test ("bitvector-count"): Add test.
This commit is contained in:
parent
24a34074ef
commit
cae74359de
10 changed files with 88 additions and 49 deletions
|
@ -243,7 +243,7 @@
|
|||
(out (vector-ref outv n))
|
||||
(kill (vector-ref killv n))
|
||||
(gen (vector-ref genv n)))
|
||||
(let ((out-count (or changed? (bit-count #t out))))
|
||||
(let ((out-count (or changed? (bitvector-count out))))
|
||||
(bitvector-fill! in (not (zero? n)))
|
||||
(let lp ((preds (vector-ref preds n)))
|
||||
(match preds
|
||||
|
@ -258,7 +258,7 @@
|
|||
(bitvector-set! out def #t))
|
||||
gen)
|
||||
(lp (1+ n) first?
|
||||
(or changed? (not (eqv? out-count (bit-count #t out))))))))
|
||||
(or changed? (not (eqv? out-count (bitvector-count out))))))))
|
||||
((or changed? first?)
|
||||
(lp 0 #f #f))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue