1.0.9.22: Dynamic-extent value-cells for MIPS.
[sbcl/tcr.git] / src / compiler / bit-util.lisp
blobca564bb80684daa4aafcb79a983e11846ec70315
1 ;;;; bit-vector hacking utilities, potentially implementation-dependent
2 ;;;; for speed
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
13 (in-package "SB!C")
15 #!-sb-fluid
16 (declaim (inline clear-bit-vector set-bit-vector bit-vector-replace
17 bit-vector-copy))
19 ;;; Clear a SIMPLE-BIT-VECTOR to zeros.
20 (defun clear-bit-vector (vec)
21 (declare (type simple-bit-vector vec))
22 (fill vec 0))
24 ;;; Fill a bit vector with ones.
25 (defun set-bit-vector (vec)
26 (declare (type simple-bit-vector vec))
27 (fill vec 1))
29 ;;; Replace the bits in To with the bits in From.
30 (defun bit-vector-replace (to from)
31 (declare (type simple-bit-vector to from))
32 (replace to from))
34 ;;; Copy a bit-vector.
35 (defun bit-vector-copy (vec)
36 (declare (type simple-bit-vector vec))
37 (copy-seq vec))