From 84cc7998b80c3c7fc4676a9d72acdded2ccf47b6 Mon Sep 17 00:00:00 2001 From: Alastair Bridgewater Date: Tue, 3 Feb 2009 04:16:23 +0000 Subject: [PATCH] 1.0.25.4: genesis load-time-value cleanup * Added a :load-time-value pseudo-gspace for use by descriptors created by fop-funcall instead of the existing (undocumented) scheme of using a null gspace and a not-null offset within a gspace to indicate such descriptors. * Fixed up some comments. --- src/compiler/generic/genesis.lisp | 16 ++++------------ version.lisp-expr | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/compiler/generic/genesis.lisp b/src/compiler/generic/genesis.lisp index 9adf27b..089f7b9 100644 --- a/src/compiler/generic/genesis.lisp +++ b/src/compiler/generic/genesis.lisp @@ -280,7 +280,7 @@ (high low &optional gspace word-offset)) (:copier nil)) ;; the GSPACE that this descriptor is allocated in, or NIL if not set yet. - (gspace nil :type (or gspace null)) + (gspace nil :type (or gspace (eql :load-time-value) null)) ;; the offset in words from the start of GSPACE, or NIL if not set yet (word-offset nil :type (or sb!vm:word null)) ;; the high and low halves of the descriptor @@ -529,7 +529,7 @@ (read-wordindexed address 0)) ;;; (Note: In CMU CL, this function expected a SAP-typed ADDRESS -;;; value, instead of the SAP-INT we use here.) +;;; value, instead of the object-and-offset we use here.) (declaim (ftype (function (descriptor sb!vm:word descriptor) (values)) note-load-time-value-reference)) (defun note-load-time-value-reference (address offset marker) @@ -547,15 +547,7 @@ (defun write-wordindexed (address index value) #!+sb-doc "Write VALUE displaced INDEX words from ADDRESS." - ;; KLUDGE: There is an algorithm (used in DESCRIPTOR-INTUIT-GSPACE) - ;; for calculating the value of the GSPACE slot from scratch. It - ;; doesn't work for all values, only some of them, but mightn't it - ;; be reasonable to see whether it works on VALUE before we give up - ;; because (DESCRIPTOR-GSPACE VALUE) isn't set? (Or failing that, - ;; perhaps write a comment somewhere explaining why it's not a good - ;; idea?) -- WHN 19990817 - (if (and (null (descriptor-gspace value)) - (not (null (descriptor-word-offset value)))) + (if (eql (descriptor-gspace value) :load-time-value) (note-load-time-value-reference address (- (ash index sb!vm:word-shift) (logand (descriptor-bits address) @@ -2329,7 +2321,7 @@ core and return a descriptor to it." *nil-descriptor*))) *current-reversed-cold-toplevels*) (setf *load-time-value-counter* (1+ counter)) - (make-descriptor 0 0 nil counter))) + (make-descriptor 0 0 :load-time-value counter))) (defun finalize-load-time-value-noise () (cold-set (cold-intern '*!load-time-values*) diff --git a/version.lisp-expr b/version.lisp-expr index 7c3ca10..72e63a9 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.25.3" +"1.0.25.4" -- 1.7.10.4