Skip to content
Snippets Groups Projects
Commit c81d18b9 authored by ram's avatar ram
Browse files

Add clear-ltn-bit-vector & make people use it. This macro and

clear-bit-vector now directly use %raw-bits.
parent 6fcefa52
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alloc.lisp,v 1.10 1992/09/07 15:33:08 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/alloc.lisp,v 1.11 1993/08/12 17:31:31 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -176,8 +176,8 @@ ...@@ -176,8 +176,8 @@
(let ((ltns (ir2-block-local-tns structure))) (let ((ltns (ir2-block-local-tns structure)))
(dotimes (i local-tn-limit) (dotimes (i local-tn-limit)
(setf (svref ltns i) nil))) (setf (svref ltns i) nil)))
(clear-bit-vector (ir2-block-written structure)) (clear-ltn-bit-vector (ir2-block-written structure))
(clear-bit-vector (ir2-block-live-in structure)) (clear-ltn-bit-vector (ir2-block-live-in structure))
(setf (ir2-block-global-tns structure) nil) (setf (ir2-block-global-tns structure) nil)
(setf (ir2-block-%label structure) nil) (setf (ir2-block-%label structure) nil)
(setf (ir2-block-locations structure) nil)) (setf (ir2-block-locations structure) nil))
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
(setf (tn-local-conflicts structure) (setf (tn-local-conflicts structure)
(make-array local-tn-limit :element-type 'bit (make-array local-tn-limit :element-type 'bit
:initial-element 0)) :initial-element 0))
(clear-bit-vector (tn-local-conflicts structure))) (clear-ltn-bit-vector (tn-local-conflicts structure)))
(setf (tn-global-conflicts structure) nil) (setf (tn-global-conflicts structure) nil)
(setf (tn-current-conflict structure) nil) (setf (tn-current-conflict structure) nil)
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
((global-conflicts (kind tn block number)) global-conflicts-next ((global-conflicts (kind tn block number)) global-conflicts-next
((setf (global-conflicts-block structure) *undefined*) ((setf (global-conflicts-block structure) *undefined*)
(clear-bit-vector (global-conflicts-conflicts structure)) (clear-ltn-bit-vector (global-conflicts-conflicts structure))
(setf (global-conflicts-tn structure) *undefined*) (setf (global-conflicts-tn structure) *undefined*)
(setf (global-conflicts-tn-next structure) nil)) (setf (global-conflicts-tn-next structure) nil))
((setf (global-conflicts-next structure) nil) ((setf (global-conflicts-next structure) nil)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/bit-util.lisp,v 1.4 1991/02/20 14:56:42 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/bit-util.lisp,v 1.5 1993/08/12 17:32:09 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -27,8 +27,23 @@ ...@@ -27,8 +27,23 @@
;;; ;;;
(defun clear-bit-vector (vec) (defun clear-bit-vector (vec)
(declare (type simple-bit-vector vec)) (declare (type simple-bit-vector vec))
(bit-xor vec vec t)) (do ((i vm:vector-data-offset (1+ i))
(end (+ vm:vector-data-offset
(ash (+ (length vec) (1- vm:word-bits))
(- (1- (integer-length vm:word-bits)))))))
((= i end) vec)
(setf (kernel:%raw-bits vec i) 0)))
(defmacro clear-ltn-bit-vector (vec)
(once-only ((n-vec vec))
(collect ((res))
(do ((i local-tn-limit (- i vm:word-bits))
(word vm:vector-data-offset (1+ word)))
((<= i 0)
(unless (zerop i)
(error "local-tn-limit not a vm:word-bits multiple.")))
(res `(setf (kernel:%raw-bits ,n-vec ,word) 0)))
`(progn ,@(res) ,n-vec))))
;;; Set-Bit-Vector -- Interface ;;; Set-Bit-Vector -- Interface
;;; ;;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment