1.0.27.42: explicit determinism in the compiler
authorChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 15:08:28 +0000 (15:08 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 24 Apr 2009 15:08:28 +0000 (15:08 +0000)
2 messages follow:

stable-sort the time specifications

Dunno if this is actually necessary for anything.

make unpacking and repacking happen in a determined order

The unpacked blocks were stuffed into a hash table and then maphashed
over; as in other cases, this is host-dependent.  Use a list and pushnew
instead.

src/compiler/meta-vmdef.lisp
src/compiler/pack.lisp
version.lisp-expr

index 8e8d108..b7318fe 100644 (file)
              (incf index)
              (refs (cons (cons born t) index))))
           (incf index)))
-      (let* ((sorted (sort (refs)
-                           (lambda (x y)
-                             (let ((x-time (car x))
-                                   (y-time (car y)))
-                               (if (time-spec-order x-time y-time)
-                                   (if (time-spec-order y-time x-time)
-                                       (and (not (cdr x)) (cdr y))
-                                       nil)
-                                   t)))
-                           :key #'car))
+      (let* ((sorted (stable-sort (refs)
+                                  (lambda (x y)
+                                    (let ((x-time (car x))
+                                          (y-time (car y)))
+                                      (if (time-spec-order x-time y-time)
+                                          (if (time-spec-order y-time x-time)
+                                              (and (not (cdr x)) (cdr y))
+                                              nil)
+                                          t)))
+                                  :key #'car))
              ;; :REF-ORDERING element type
              ;;
              ;; KLUDGE: was (MOD #.MAX-VOP-TN-REFS), which is still right
index 1673e94..3399032 100644 (file)
 ;;; sticking them in this hash-table. This is initially null. We
 ;;; create the hashtable if we do any unpacking.
 (defvar *repack-blocks*)
-(declaim (type (or hash-table null) *repack-blocks*))
+(declaim (type list *repack-blocks*))
 
 ;;; Set the LIVE-TNS vectors in all :FINITE SBs to represent the TNs
 ;;; live at the end of BLOCK.
                (let ((vop (tn-ref-vop ref)))
                  (if (eq (vop-info-name (vop-info vop)) 'move-operand)
                      (delete-vop vop)
-                     (setf (gethash (vop-block vop) *repack-blocks*) t))))))
+                     (pushnew (vop-block vop) *repack-blocks*))))))
       (zot (tn-reads tn))
       (zot (tn-writes tn))))
 
         (node (vop-node (tn-ref-vop op)))
         (fallback nil))
     (flet ((unpack-em (victims)
-             (unless *repack-blocks*
-               (setq *repack-blocks* (make-hash-table :test 'eq)))
-             (setf (gethash (vop-block (tn-ref-vop op)) *repack-blocks*) t)
+             (pushnew (vop-block (tn-ref-vop op)) *repack-blocks*)
              (dolist (victim victims)
                (event unpack-tn node)
                (unpack-tn victim))
               (unless *repack-blocks* (return))
               (let ((orpb *repack-blocks*))
                 (setq *repack-blocks* nil)
-                (maphash (lambda (block v)
-                           (declare (ignore v))
-                           (event repack-block)
-                           (pack-load-tns block))
-                         orpb))))
+                (dolist (block orpb)
+                  (event repack-block)
+                  (pack-load-tns block)))))
 
          (values))
     (clean-up-pack-structures)))
index a9d632f..a710b05 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.27.41"
+"1.0.27.42"