mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-19 02:00:26 +02:00
Replace bit-position with bitvector-position
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 (scm_bitvector_position): New function. * libguile/deprecated.h: * libguile/deprecated.c (scm_bit_position): Deprecate. * module/ice-9/sandbox.scm (bitvector-bindings): Replace bit-position with bitvector-position. * module/language/cps/intset.scm (bitvector->intset): Use bitvector-position. * module/system/vm/frame.scm (available-bindings): Use bitvector-position. * test-suite/tests/bitvectors.test ("bitvector-position"): Add test.
This commit is contained in:
parent
cae74359de
commit
06709d77b9
10 changed files with 97 additions and 70 deletions
|
@ -1076,9 +1076,9 @@ allocation limit is exceeded, an exception will be thrown to the
|
|||
(define bitvector-bindings
|
||||
'(((guile)
|
||||
bitvector-count
|
||||
bitvector-position
|
||||
bit-count*
|
||||
bit-extract
|
||||
bit-position
|
||||
bitvector
|
||||
bitvector->list
|
||||
bitvector-length
|
||||
|
|
|
@ -781,7 +781,7 @@
|
|||
out
|
||||
(intset-union out (make-intset min *leaf-bits* tail))))
|
||||
(let lp ((out empty-intset) (min 0) (pos 0) (tail 0))
|
||||
(let ((pos (bit-position #t bv pos)))
|
||||
(let ((pos (bitvector-position bv #t pos)))
|
||||
(cond
|
||||
((not pos)
|
||||
(finish-tail out min tail))
|
||||
|
|
|
@ -283,7 +283,7 @@
|
|||
(bit-set*! tmp (vector-ref killv (1- n)) #f)
|
||||
tmp))))
|
||||
(let lp ((n 0))
|
||||
(let ((n (bit-position #t live n)))
|
||||
(let ((n (bitvector-position live #t n)))
|
||||
(if n
|
||||
(match (vector-ref defs n)
|
||||
(#(name def-offset slot representation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue