[movitz-cvs] CVS update: movitz/losp/muerte/scavenge.lisp

Frode Vatvedt Fjeld ffjeld at common-lisp.net
Wed Jun 16 07:42:55 UTC 2004


Update of /project/movitz/cvsroot/movitz/losp/muerte
In directory common-lisp.net:/tmp/cvs-serv6136

Modified Files:
	scavenge.lisp 
Log Message:
Changed the layout of vectors somewhat (this is a minor change, not
the "proper" new layout that should come soon). This requires a
re-compile of any images. And fixed some (somewhat related) bugs in
the map-heap-words function.

Date: Wed Jun 16 00:42:55 2004
Author: ffjeld

Index: movitz/losp/muerte/scavenge.lisp
diff -u movitz/losp/muerte/scavenge.lisp:1.10 movitz/losp/muerte/scavenge.lisp:1.11
--- movitz/losp/muerte/scavenge.lisp:1.10	Fri Jun 11 16:26:14 2004
+++ movitz/losp/muerte/scavenge.lisp	Wed Jun 16 00:42:55 2004
@@ -10,7 +10,7 @@
 ;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
 ;;;; Created at:    Mon Mar 29 14:54:08 2004
 ;;;;                
-;;;; $Id: scavenge.lisp,v 1.10 2004/06/11 23:26:14 ffjeld Exp $
+;;;; $Id: scavenge.lisp,v 1.11 2004/06/16 07:42:55 ffjeld Exp $
 ;;;;                
 ;;;;------------------------------------------------------------------
 
@@ -59,12 +59,15 @@
 	 ((scavenge-typep x :illegal)
 	  (error "Illegal word ~Z at ~S." x scan))
 	 ((scavenge-typep x :bignum)
-	  (assert (evenp scan))
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
 	  ;; Just skip the bigits
 	  (let* ((bigits (word-upper16 x))
 		 (delta (1+ (logand bigits -2))))
 	    (incf scan delta)))
 	 ((scavenge-typep x :funobj)
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
 	  ;; Process code-vector pointer specially..
 	  (let* ((funobj (%word-offset scan #.(movitz:tag :other)))
 		 (code-vector (funobj-code-vector funobj))
@@ -80,18 +83,26 @@
 		))
 	    (incf scan (+ 7 num-jumpers)))) ; Don't scan the jumpers.
 	 ((scavenge-typep x :infant-object)
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
 	  (error "Scanning an infant object ~Z at ~S (end ~S)." x scan end-location))
 	 ((or (scavenge-wide-typep x :vector
 				   #.(bt:enum-value 'movitz:movitz-vector-element-type :u8))
 	      (scavenge-wide-typep x :vector
 				   #.(bt:enum-value 'movitz:movitz-vector-element-type :character)))
-	  (let ((len (word-upper16 x)))
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
+	  (let ((len (memref scan (word-upper16 x) 0 :unsigned-byte16)))
 	    (incf scan (1+ (* 2 (truncate (+ 7 len) 8))))))
 	 ((scavenge-wide-typep x :vector #.(bt:enum-value 'movitz:movitz-vector-element-type :u16))
-	  (let ((len (word-upper16 x)))
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
+	  (let ((len (memref scan (word-upper16 x) 0 :unsigned-byte16)))
 	    (incf scan (1+ (* 2 (truncate (+ 3 len) 4))))))
 	 ((scavenge-wide-typep x :vector #.(bt:enum-value 'movitz:movitz-vector-element-type :u32))
-	  (let ((len (word-upper16 x)))
+	  (assert (evenp scan) ()
+	    "Scanned #x~Z at odd address #x~X." x scan)
+	  (let ((len (memref scan (word-upper16 x) 0 :unsigned-byte16)))
 	    (incf scan (1+ (logand (1+ len) -2)))))
 	 ((eq x (fixnum-word 3))
 	  (incf scan)





More information about the Movitz-cvs mailing list