Changeset 10484


Ignore:
Timestamp:
Aug 15, 2008, 10:44:09 PM (11 years ago)
Author:
gb
Message:

Propagate r10483 (package-ref initialization) to working-0711.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-0/nfasload.lisp

    r10392 r10484  
    247247(defvar *package-refs*)
    248248(setq *package-refs* (make-hash-table :test #'equal))
     249(defvar *package-refs-lock*)
     250(setq *package-refs-lock* (make-lock))
    249251
    250252(defun register-package-ref (name)
    251   (or (gethash name *package-refs*)
    252       (setf (gethash name *package-refs*) (make-package-ref name))))
     253  (let* ((ref
     254          (or (gethash name *package-refs*)
     255              (with-lock-grabbed (*package-refs-lock*)
     256                (or
     257                 (gethash name *package-refs*) ; check again
     258                 (let* ((r (make-package-ref name)))
     259                   (setf (gethash name *package-refs*) r)))))))
     260    (unless (package-ref.pkg ref)
     261      (setf (package-ref.pkg ref) (find-package name)))
     262    ref))
     263
    253264
    254265(dolist (p %all-packages%)
     
    360371         (size-of-code (%fasl-read-count s))
    361372         (vector (%alloc-misc size-in-elements target::subtag-function))
    362          (function (%function-vector-to-function vector)))
     373         (function (function-vector-to-function vector)))
    363374    (declare (fixnum size-in-elements size-of-code))
    364375    (%epushval s function)
    365376    (%fasl-read-n-bytes s vector 0 (ash size-of-code target::word-shift))
     377    #+x8632-target
     378    (%update-self-references vector)
    366379    (do* ((numconst (- size-in-elements size-of-code))
    367380          (i 0 (1+ i))
     
    527540         (size-in-bytes (subtag-bytes subtag element-count))
    528541         (vector (%alloc-misc element-count subtag))
    529          (byte-offset (or #+ppc32-target (if (= subtag ppc32::subtag-double-float-vector) 4) 0)))
     542         (byte-offset (or #+32-bit-target (if (= subtag target::subtag-double-float-vector) 4) 0)))
    530543    (declare (fixnum subtag element-count size-in-bytes))
    531544    (%epushval s vector)
     
    587600  #+64-bit-target
    588601  (fasl-read-ivector s target::subtag-double-float-vector)
    589   #+ppc32-target
     602  #+32-bit-target
    590603  (let* ((element-count (%fasl-read-count s))
    591          (size-in-bytes (subtag-bytes ppc32::subtag-double-float-vector
     604         (size-in-bytes (subtag-bytes target::subtag-double-float-vector
    592605                                      element-count))
    593606         (vector (%alloc-misc element-count
    594                               ppc32::subtag-double-float-vector)))
    595     (declare (fixnum subtag element-count size-in-bytes))
     607                              target::subtag-double-float-vector)))
     608    (declare (fixnum element-count size-in-bytes))
    596609    (%epushval s vector)
    597     (%fasl-read-n-bytes s vector (- ppc32::misc-dfloat-offset
    598                                     ppc32::misc-data-offset)
     610    (%fasl-read-n-bytes s vector (- target::misc-dfloat-offset
     611                                    target::misc-data-offset)
    599612                        size-in-bytes)
    600613    vector))
     
    607620         (size-in-bytes (* 4 element-count))
    608621         (vector (allocate-typed-vector :code-vector element-count)))
    609     (declare (fixnum subtag element-count size-in-bytes))
     622    (declare (fixnum element-count size-in-bytes))
    610623    (%epushval s vector)
    611624    (%fasl-read-n-bytes s vector 0 size-in-bytes)
Note: See TracChangeset for help on using the changeset viewer.