0.9.18.31: room fix
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 3 Nov 2006 19:53:59 +0000 (19:53 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 3 Nov 2006 19:53:59 +0000 (19:53 +0000)
 * Type-error: SHIFT in VECTOR-TOTAL-SIZE had a bogus declaration,
   masked by SAFETY 0. Remove the offending declaration and increase
   safety.
 * A more aggressive ROOM test.

src/code/room.lisp
src/runtime/coreparse.c
version.lisp-expr

index ea2f309..6102f23 100644 (file)
                 (ecase (room-info-kind info)
                   (:vector 0)
                   (:string 1)))))
-    (declare (type (integer -3 3) shift))
     (round-to-dualword
      (+ (* vector-data-offset n-word-bytes)
-        (the fixnum
-             (if (minusp shift)
-                 (ash (the fixnum
-                           (+ len (the fixnum
-                                       (1- (the fixnum (ash 1 (- shift)))))))
-                      shift)
-                 (ash len shift)))))))
+        (if (minusp shift)
+            (ash (+ len (1- (ash 1 (- shift))))
+                 shift)
+            (ash len shift))))))
 
 ;;; Access to the GENCGC page table for better precision in
 ;;; MAP-ALLOCATED-OBJECTS
               (gen (signed 8))))
   (declaim (inline find-page-index))
   (define-alien-routine "find_page_index" long (index long))
-  (define-alien-variable "page_table"
-      (array (struct page)
-             #.(truncate (- dynamic-space-end
-                            dynamic-space-start)
-                         sb!vm:gencgc-page-size))))
+  (define-alien-variable "page_table" (* (struct page))))
 
 ;;; Iterate over all the objects allocated in SPACE, calling FUN with
 ;;; the object, the object's type code, and the object's total size in
   (without-gcing
    (multiple-value-bind (start end) (space-bounds space)
      (declare (type system-area-pointer start end))
-     (declare (optimize (speed 3) (safety 0)))
+     (declare (optimize (speed 3)))
      (let ((current start)
            #!+gencgc (skip-tests-until-addr 0))
        (labels ((maybe-finish-mapping ()
         (counts (make-array 256 :initial-element 0 :element-type 'fixnum)))
     (map-allocated-objects
      (lambda (obj type size)
-       (declare (fixnum size) (optimize (speed 3) (safety 0)) (ignore obj))
+       (declare (fixnum size) (optimize (speed 3)) (ignore obj))
        (incf (aref sizes type) size)
        (incf (aref counts type)))
      space)
              (type unsigned-byte total-bytes))
     (map-allocated-objects
      (lambda (obj type size)
-       (declare (fixnum size) (optimize (safety 0)))
+       (declare (fixnum size))
        (when (eql type code-header-widetag)
          (incf total-bytes size)
          (let ((words (truly-the fixnum (%code-code-size obj)))
       (declare (inline map-allocated-objects))
       (map-allocated-objects
        (lambda (obj type size)
-         (declare (fixnum size) (optimize (safety 0)))
+         (declare (fixnum size))
          (case type
            (#.code-header-widetag
             (let ((inst-words (truly-the fixnum (%code-code-size obj))))
     (declare (fixnum total-objects total-bytes))
     (map-allocated-objects
      (lambda (obj type size)
-       (declare (fixnum size) (optimize (speed 3) (safety 0)))
+       (declare (fixnum size) (optimize (speed 3)))
        (when (eql type instance-header-widetag)
          (incf total-objects)
          (incf total-bytes size)
                    (note-conses (cdr x)))))
         (map-allocated-objects
          (lambda (obj obj-type size)
-           (declare (optimize (safety 0)))
            (let ((addr (get-lisp-obj-address obj)))
              (when (>= addr start)
                (when (if count
     (let ((res ()))
       (map-allocated-objects
        (lambda (obj obj-type size)
-         (declare (optimize (safety 0)))
          (when (and (or (not type) (eql obj-type type))
                     (or (not smaller) (<= size smaller))
                     (or (not larger) (>= size larger))
              (funcall fun obj))))
     (map-allocated-objects
      (lambda (obj obj-type size)
-       (declare (optimize (safety 0)) (ignore obj-type size))
+       (declare (ignore obj-type size))
        (typecase obj
          (cons
           (when (or (eq (car obj) object)
index 00598c5..ae429b4 100644 (file)
@@ -140,13 +140,13 @@ process_directory(int fd, u32 *ptr, int count, os_vm_offset_t file_offset)
 
         switch (id) {
         case DYNAMIC_CORE_SPACE_ID:
-           if (len > dynamic_space_size) {
+            if (len > dynamic_space_size) {
                 fprintf(stderr,
                         "dynamic space too small for core: %ldKiB required, %ldKiB available.\n",
                         len >> 10,
                         (long)dynamic_space_size >> 10);
                 exit(1);
-            }          
+            }
 #ifdef LISP_FEATURE_GENCGC
             if (addr != (os_vm_address_t)DYNAMIC_SPACE_START) {
                 fprintf(stderr, "in core: 0x%lx; in runtime: 0x%lx \n",
@@ -161,8 +161,8 @@ process_directory(int fd, u32 *ptr, int count, os_vm_offset_t file_offset)
                         (long)DYNAMIC_0_SPACE_START,
                         (long)DYNAMIC_1_SPACE_START);
                 lose("warning: core/runtime address mismatch: DYNAMIC_SPACE_START\n");
-            }      
-#endif     
+            }
+#endif
 #if defined(ALLOCATION_POINTER)
             SetSymbolValue(ALLOCATION_POINTER, (lispobj)free_pointer,0);
 #else
index baf6bd0..aad4101 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".)
-"0.9.18.30"
+"0.9.18.31"