1.0.4.41: unbreak threaded build
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 7 Apr 2007 18:27:05 +0000 (18:27 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 7 Apr 2007 18:27:05 +0000 (18:27 +0000)
 * move the newflangled DEFINE-STRUCTURE-SLOT-FOOs later in the
   build, so as to have SB!VM:INSTANCE-SLOTS-OFFSET available.

 * STRUCTURE-SLOT-INDEX unused -- oops in cherrypicking from a different
   tree.

src/code/defstruct.lisp
src/code/late-extensions.lisp
version.lisp-expr

index e4f6fb2..84d8418 100644 (file)
         (when errorp
           (error "No DEFSTRUCT-DESCRIPTION for ~S." name)))))
 
-(defun structure-slot-index (type slot-name &optional (errorp t))
-  (let ((slotd (find slot-name
-                     (dd-slots (find-defstruct-description type))
-                     :key #'dsd-name)))
-    (if slotd
-        (dsd-index slotd)
-        (when errorp
-          (error "No slot named ~S in ~S." slot-name type)))))
-
-;;; Used internally, but it would be nice to provide something
-;;; like this for users as well.
-#!+sb-thread
-(defmacro define-structure-slot-compare-and-exchange
-    (name &key structure slot)
-  (let* ((dd (find-defstruct-description structure t))
-         (slotd (when dd (find slot (dd-slots dd) :key #'dsd-name)))
-         (type (when slotd (dsd-type slotd)))
-         (index (when slotd (dsd-index slotd))))
-    (unless index
-      (error "Slot ~S not found in ~S." slot structure))
-    `(progn
-       (declaim (inline ,name))
-       (defun ,name (instance old new)
-         (declare (type ,structure instance)
-                  (type ,type new))
-         (sb!vm::%instance-set-conditional instance ,index old new)))))
-
-;;; Ditto
-#!+sb-thread
-(defmacro define-structure-slot-addressor (name &key structure slot)
-  (let* ((dd (find-defstruct-description structure t))
-         (slotd (when dd (find slot (dd-slots dd) :key #'dsd-name)))
-         (index (when slotd (dsd-index slotd))))
-    (unless index
-      (error "Slot ~S not found in ~S." slot structure))
-    `(progn
-       (declaim (inline ,name))
-       (defun ,name (instance)
-         (declare (type ,structure instance) (optimize speed))
-         (sb!ext:truly-the
-          sb!vm:word
-          (+ (sb!kernel:get-lisp-obj-address instance)
-             (- (* ,(+ sb!vm:instance-slots-offset index) sb!vm:n-word-bytes)
-                sb!vm:instance-pointer-lowtag)))))))
-
 (/show0 "code/defstruct.lisp end of file")
index 4d0e08b..f2756dc 100644 (file)
                                (write-string (unprintable-object-string x) s))))
             (:copier nil))
   string)
+
+;;; Used internally, but it would be nice to provide something
+;;; like this for users as well.
+#!+sb-thread
+(defmacro define-structure-slot-compare-and-exchange
+    (name &key structure slot)
+  (let* ((dd (find-defstruct-description structure t))
+         (slotd (when dd (find slot (dd-slots dd) :key #'dsd-name)))
+         (type (when slotd (dsd-type slotd)))
+         (index (when slotd (dsd-index slotd))))
+    (unless index
+      (error "Slot ~S not found in ~S." slot structure))
+    `(progn
+       (declaim (inline ,name))
+       (defun ,name (instance old new)
+         (declare (type ,structure instance)
+                  (type ,type new))
+         (sb!vm::%instance-set-conditional instance ,index old new)))))
+
+;;; Ditto
+#!+sb-thread
+(defmacro define-structure-slot-addressor (name &key structure slot)
+  (let* ((dd (find-defstruct-description structure t))
+         (slotd (when dd (find slot (dd-slots dd) :key #'dsd-name)))
+         (index (when slotd (dsd-index slotd))))
+    (unless index
+      (error "Slot ~S not found in ~S." slot structure))
+    `(progn
+       (declaim (inline ,name))
+       (defun ,name (instance)
+         (declare (type ,structure instance) (optimize speed))
+         (sb!ext:truly-the
+          sb!vm:word
+          (+ (sb!kernel:get-lisp-obj-address instance)
+             (- (* ,(+ sb!vm:instance-slots-offset index) sb!vm:n-word-bytes)
+                sb!vm:instance-pointer-lowtag)))))))
+
index a998fd6..5d089c8 100644 (file)
@@ -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.4.40"
+"1.0.4.41"